W3C home > Mailing lists > Public > public-rdfa-wg@w3.org > October 2011

Re: Support for integration with XML is broken

From: Henry S. Thompson <ht@inf.ed.ac.uk>
Date: Thu, 20 Oct 2011 16:13:25 +0100
To: Ivan Herman <ivan@w3.org>
Cc: Toby Inkster <tai@g5n.co.uk>, public-rdfa-wg@w3.org
Message-ID: <f5bpqhrlmqy.fsf@calexico.inf.ed.ac.uk>
Ivan Herman writes:

> Doesn't DOM have a bunch calls in the form blablaNS? These do not work, afaik. 
Sorry, but my example shows that they _do_ work!

> So yes, you can get the attribute value that happens to have a
> AAA:BBB format. But it does not interpret this.

Yes it does -- see the example!

> This means that an implementation would have to check every
> attribute by
> - looking at the BBB format
> - looking at the AAA:BBB format and check whether there is somewhere an xmlns:AAA attribute up the tree with the right namespace URI...

Not so -- all you have to do is check for .localName=="about", and if
it is, then check for .namespaceURI=="http://www.w3.org/1999/xhtml".
Presumably you are already doing the first.  Doing the second iff you
are not in an XHTML document seems a very modest overhead!

> Ie, the whole management of namespace has to be done manually

No, it doesn't.  Please inspect the example again, particularly the
last two lines:

>>> from xml.dom.minidom import parseString
>>> d=parseString("<r xmlns:x='http://www.w3.org/1999/xhtml' x:about='#foo'/>")
>>> d.firstChild.getAttributeNode('x:about').localName
>>> d.firstChild.getAttributeNode('x:about').namespaceURI

       Henry S. Thompson, School of Informatics, University of Edinburgh
      10 Crichton Street, Edinburgh EH8 9AB, SCOTLAND -- (44) 131 650-4440
                Fax: (44) 131 651-1426, e-mail: ht@inf.ed.ac.uk
                       URL: http://www.ltg.ed.ac.uk/~ht/
 [mail from me _always_ has a .sig like this -- mail without it is forged spam]
Received on Thursday, 20 October 2011 15:13:50 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:19:53 UTC