W3C home > Mailing lists > Public > www-tag@w3.org > December 2004

Re: TAG Last Call comments on xml:id

From: Daniel Veillard <veillard@redhat.com>
Date: Tue, 7 Dec 2004 15:25:57 -0500
To: Chris Lilley <chris@w3.org>
Cc: public-xml-id@w3.org, www-tag@w3.org
Message-ID: <20041207202557.GA25551@redhat.com>

On Tue, Dec 07, 2004 at 08:14:38PM +0100, Chris Lilley wrote:
> On Tuesday, December 7, 2004, 10:51:28 AM, Daniel wrote:
> DV> On Tue, Dec 07, 2004 at 12:58:59AM +0100, Chris Lilley wrote:
> >> The TAG would however still be interested to know how Core plans to test
> >> xml:id in the Candidate Review period to ensure that the constraints in
> >> the document are adequately exercised. Are there any XML processors
> >> (schema or DTD based) that already implement this, or do you know of
> DV> libxml2 implements xml:id, maybe not as of the last draft, but very
> DV> closely. It also has DTD, RelaxNG and an incomplete W3C XML Schemas
> DV> support.
> Hi DV!

  Hi Chris !

> Great news. So, it would be possible to test what happens if xml:id is
> decalred to be, say CDATA i the DTD, that sort of thing.

   yes I think that one is already part of the regression tests

paphio:~/XML -> cat test/xmlid/id_err2.xml
<!DOCTYPE foo [
<foo xml:id="bar"/>
paphio:~/XML ->

  No garantee for the Schemas/RNG compatibility rules though. At this point
the behaviour may not be fully compliant on error cases with what the 
spec currently suggests.

> DV> Support was added in version 2.6.9 released Apr 18 2004. If you use recent
> DV> Linux, MacOS X or a Solaris your version of libxml2 is likely to have
> DV> xml:id support enabled by default.
> $ xmllint -version
> xmllint: using libxml version 20613
>    compiled with: DTDValid FTP HTTP HTML C14N Catalog XPath
>    XPointer XInclude Iconv Unicode Regexps Automata Schemas
> does xml:id support need to be compiled in specially or would it be in
> the build above (on cygwin, in my case).

  It should be in. I didn't add an option to disable it, basically because
xml:id was a reserved identifier. And I didn't got a single report since
I pushed 2.6.9 out that it generated any trouble.

> DV>   The XPointer/XPath/XSLT/XMLDSig implementations based on libxml2 should
> DV> already make use of xml:id if present in the instances.
> That would be excellent. It should mainly be a case of checking that
> getElementBtId is working as expected, that XPath is finding elements by
> xml:id and so on.

  I don't have an exact DOM API, but upon recognizing xml:id and if buiding
a tree, then the ID is added to the table, as if it was declared in the
internal subset as an ID attribute.
  The regression tests are based on using XPath and querying for the
"id('bar')" expression and checking the errors and returned values.

paphio:~/XML -> make IDtests
## xml:id regression tests
paphio:~/XML ->

  that's part of the normal libxml2 regression tests, and would certainly
need to be extended (only 6 basic tests right now) to try to assert


Daniel Veillard      | Red Hat Desktop team http://redhat.com/
veillard@redhat.com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/
Received on Tuesday, 7 December 2004 20:26:19 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:32:44 UTC