I have a piece of XML that I am attempting to sign then verify which uses relative namespaces:
<Organization>
<OrganizationName xmlns:_xml="xml" _xml:lang="en">name</OrganizationName>
<OrganizationDisplayName xmlns:_xml="xml" _xml:lang="en">name</OrganizationDisplayName>
<OrganizationURL xmlns:_xml="xml" _xml:lang="en">http://www.example.com/</OrganizationURL>
</Organization>
OpenSAML throws the following exception:
org.apache.xml.security.c14n.CanonicalizationException: Element OrganizationName has a relative namespace: _xml="xml"
Why are relative namespaces considered bad? Surely the parser could just resolve the namespace when parsing the true value?
EDIT: found some more information
The Namespaces in XML 1.1 document states under section 2.2:
This deprecation of relative URI references was decided on by a W3C XML Plenary Ballot [Relative URI deprecation]. It also declares that "later specifications such as DOM, XPath, etc. will define no interpretation for them".
This was voted for on the Ballot on relative URI References.