Closed ymark closed 6 years ago
Added extra checks that validate the prefix and the URI of a namespace when they are added in the XPathContext (the structure that stores the namespaces and the actual URIs).
The validation is carried out in terms of empty values for the prefix and the URI. To this end the following ERROR messages are shown:
When the URI of the namespace is empty:
Invalid namespace declaration: the URI of a namespace cannot be empty [Prefix: "err", URI: (empty)]
When the prefix of the namespace is empty:
Invalid namespace declaration: the prefix of a namespace cannot be empty [Prefix: (empty), URI: "http://localhost/"]
When both the prefix and the URI of the namespace are empty:
Invalid namespace declaration: the prefix of a namespace cannot be empty [Prefix: (empty), URI: (empty)]
In addition, the execution of the transformation stops, because otherwise the error will be thrown from Jena (i.e. for non well-formed URIs).
The fix will appear in version 1.8.5
When namespace information are empty (i.e. prefix and uri ) then some strange error messages occur. This happens if namespaces are declared in the namespace block, as well as if they are declared in the info block. See below some indicative examples.
Empty namespace declared in the namespace block
Empty namespace declared in the info block
In both case the error message is: