-
Notifications
You must be signed in to change notification settings - Fork 49
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
Namespaces not marshalled correctly #153
Comments
Hi, before we proceed, please write in a comment that this test case is a contribution under the project license: https://github.com/highsource/ogc-schemas/blob/master/LICENSE Thanks, Best wishes, |
Hi, I agree to contribute the test case (index.js and package.json) under the license https://github.com/highsource/ogc-schemas/blob/master/LICENSE. Unfortunately I can't vouch for the XML document as I do not own the service in question where the fragment was taken from. Sampo |
Thanks. No problem, XML is easy to fake. I've reproduced it. In case empty namespace is declared (
I thing the error is the same, Jsonix probably for some reason thinks that I'll open issues in Jsonix. As a workaround for the moment don't use namespace mapping with empty namespace. |
Will be continued in highsource/jsonix#111. |
This must be fixed now, See highsource/jsonix#111. See (somewhat simplified) https://github.com/highsource/jsonix-support/tree/master/w/wmts-gh111 The problem was that namespace for prefix |
This might be a more generic issue with jsonix, but I bring it first here as it's easiest to duplicate with the ogc-schemas package.
I'm attempting to read a WMTS Capabilities document, modify it, and then return it as close to the original as possible. To do this, I scan the unmarshalled object for namespace prefixes and supply them to the marshaller. However, this process breaks the outgoing document: If I supply namespace prefixes, the element ows:Value is written without the prefix.
I've attached a test case with package.json + code + simplified wmts capabilities file. Running the script reads the XML, finds prefixes from the object and marshals it using these prefixes. You should immediately see that the Value tag is without a namespace prefix (it is part of the ows namespace). The test script contains a note and a commented line that controls whether namespaces are provided. By uncommenting the line, the document becomes ugly (automatically generated prefixes, ows namespace declared twice), but the Value element is prefixed correctly.
jsonix-ogc-schemas-bugreport.zip
The text was updated successfully, but these errors were encountered: