XRI's in xml namespaces

Thomas Broyer t.broyer at gmail.com
Mon Jun 12 21:37:18 UTC 2006


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


More information about the yadis mailing list