You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The original namespace prefixes on the InsertObservation element have been renumbered. The namespace URIs are the same, but the prefixes are all different. However, the original namespace prefixes still appear on the swes:extension element.
The namespace prefix of the swes:extension element was originally ‘swes’ but is now ‘ns1’. Also The original ‘swes’ namespace prefix still appears in list of namespaces of the extension element. There are now two prefixes for the same namespace URI.
Here’s where it gets nasty:
Consider this SOS2 InsertObservation document. This one already has namespaces numbered ns1 through ns19.
When this document is unmarshalled and remarshalled the namespaces are shuffled like they were in the first case. Except this time when the swes extension element is assigned a new namespace, that prefix has already been used...
The {http://www.opengis.net/swes/2.0}extension element originally had a namespace prefix of ‘ns2’. After being unmarshalled and remarshalled it was assigned the namespace prefix of ‘ns1’. Where we get into trouble is that the {http://www.opengis.net/swes/2.0}extension element carries with it the namespace definitions of the original InsertObservation document. In the original document the namespace prefix ‘ns1’ is assigned to {http://www.w3.org/1999/xlink}. This results in two namespace URIs assigned to the same namespace prefix. This corrupts the document and causes it to fail validation.
The text was updated successfully, but these errors were encountered:
I'm not entirely certain that this is the correct place to post this issue. If it isn't, please direct me to the proper venue.
There are two methods that accept data of type ANY in an SOS 2.0 Insert Observation document.
Via the JaxB API they are accessed by:
The namespace prefixes of these elements are being corrupted when they are marshalled.
Example (with an excessive number of namespaces):
Consider the below SOS2 InsertObservation document...
… when unmarshalled and remarshalled you’ll get a document fragment that looks something that looks like this...
The original namespace prefixes on the InsertObservation element have been renumbered. The namespace URIs are the same, but the prefixes are all different. However, the original namespace prefixes still appear on the swes:extension element.
The namespace prefix of the swes:extension element was originally ‘swes’ but is now ‘ns1’. Also The original ‘swes’ namespace prefix still appears in list of namespaces of the extension element. There are now two prefixes for the same namespace URI.
Here’s where it gets nasty:
Consider this SOS2 InsertObservation document. This one already has namespaces numbered ns1 through ns19.
When this document is unmarshalled and remarshalled the namespaces are shuffled like they were in the first case. Except this time when the swes extension element is assigned a new namespace, that prefix has already been used...
The {http://www.opengis.net/swes/2.0}extension element originally had a namespace prefix of ‘ns2’. After being unmarshalled and remarshalled it was assigned the namespace prefix of ‘ns1’. Where we get into trouble is that the {http://www.opengis.net/swes/2.0}extension element carries with it the namespace definitions of the original InsertObservation document. In the original document the namespace prefix ‘ns1’ is assigned to {http://www.w3.org/1999/xlink}. This results in two namespace URIs assigned to the same namespace prefix. This corrupts the document and causes it to fail validation.
The text was updated successfully, but these errors were encountered: