-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add parameter "namespaces" #522
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you sure that the semicolon is suitable as namespace separator? Then you can't set a namespace name containing this character (see also similar discussion regarding multiple headers in #456).
Also, the space as key-value separator seems a little unusual. I would suggest we either adopt the full syntax of Java property files (which the namespace file setter uses) or model this new setter after the header setter in HttpOpener
(I'm not sure if there are other precedents for this kind of functionality).
Finally, using an empty key (prefix) for the default namespace feels a little awkward. I suspect that this is a consequence of the previous behaviour, but I would suggest that we either make the key optional in this case or add support for __default
as the key for the default namespace (this is also the default map key for Metamorph Maps
).
metafacture-xml/src/test/java/org/metafacture/xml/SimpleXmlEncoderTest.java
Outdated
Show resolved
Hide resolved
95b618c
to
dc1f6c8
Compare
I've changed to your proposals. Will squash when you approve and add a PG example. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the syntax description could be more accurate, but overall 👍
metafacture-xml/src/main/java/org/metafacture/xml/SimpleXmlEncoder.java
Outdated
Show resolved
Hide resolved
metafacture-xml/src/main/java/org/metafacture/xml/SimpleXmlEncoder.java
Outdated
Show resolved
Hide resolved
metafacture-xml/src/main/java/org/metafacture/xml/SimpleXmlEncoder.java
Outdated
Show resolved
Hide resolved
Set a namespace or a list of namespaces. A namespace is a Java Properties structure, i.e. a key-value structure where the key is separated from the value by an equal sign '=', a semicolon ':' or white space ' '.Multiple namespaces are separated by a line feed '\n'.
…oder.java Co-authored-by: Jens Wille <[email protected]>
a2a43ad
to
874505f
Compare
metafacture-xml/src/main/java/org/metafacture/xml/SimpleXmlEncoder.java
Outdated
Show resolved
Hide resolved
…oder.java Co-authored-by: Jens Wille <[email protected]>
See #505.
Set a namespace or a list of namespaces. A namespace is a key-value structure, separated by a space. Multiple namespaces are separated by a semicolon.