XRI's in xml namespaces

Grant Monroe grant at janrain.com
Mon Jun 12 21:58:11 UTC 2006

On 6/12/06, Thomas Broyer <t.broyer at gmail.com> wrote:
> 2006/6/12, Grant Monroe:
> > Is it technically valid to use an XRI in an XML namespace attribute?
> > I was looking at the W3C recommendation on XML namespaces,
> > http://www.w3.org/TR/xml-names11/, and it looks like the value of an
> > XML namespace attribute must be an IRI. While there may be rules to
> > convert XRIs to IRIs, current parsers might barf.
> >From what I read about XRIs, if you apply escaping rules from section
> 2.3.2 (from XRI Syntax 2.0), you should have an IRI, usable as a
> namespace.
> Could someone more used to XRIs confirm this?
> > I bring this up because .Net xml parsing converts xml namespaces to
> > Uri objects.
> Are you sure?
> I can't find a reference to Uri in Microsoft's docs:
> XmlNode.NamespaceURI is a string:
> http://msdn.microsoft.com/library/FRE/cpref/html/frlrfsystemxmlxmlnodeclassnamespaceuritopic.asp
> XmlQualifiedName.Namespace is a string:
> http://msdn.microsoft.com/library/FRE/cpref/html/frlrfsystemxmlxmlqualifiednameclassnamespacetopic.asp
> XmlReader.NamespaceURI is a string:
> http://msdn.microsoft.com/library/FRE/cpref/html/frlrfsystemxmlxmlreaderclassnamespaceuritopic.asp
> and finally, XmlNamedNodeMap (which is also the base class for
> XmlAttributeList) and XmlNamespaceManager use strings:
> http://msdn.microsoft.com/library/FRE/cpref/html/frlrfsystemxmlxmlnamednodemapclasstopic.asp
> http://msdn.microsoft.com/library/FRE/cpref/html/frlrfsystemxmlxmlnamespacemanagerclasstopic.asp
> and having used ILDAsm on Microsoft's XmlTextReader and XmlScanner, I
> can't find any URI parsing...
> --
> Thomas Broyer

Well, it looks like I was smoking a bit of crack about the xml parser
turning namespaces into Uri objects. .Net xml parsing works just fine.
I had an unrelated bug that lead me to this issue. I am still a bit
troubled by using broken XML even if it isn't an implementation
hurdle, though.

Grant Monroe

More information about the yadis mailing list