Skip to Content.
Sympa Menu

xom-interest - [XOM-interest] Non NCName IDs

xom-interest AT lists.ibiblio.org

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: Elliotte Harold <elharo AT metalab.unc.edu>
  • To: public-xml-id AT w3.org
  • Cc: xom-interest <xom-interest AT lists.ibiblio.org>, Wolfgang Hoschek <whoschek AT lbl.gov>
  • Subject: [XOM-interest] Non NCName IDs
  • Date: Mon, 20 Mar 2006 10:45:58 -0500

Wolfgang Hoschek pointed out an inconsistency in how XOM tests xml:id values which I've now traced to an apparent discrepancy between the current xml:id test suite and the xml:id spec, and I was hoping somebody could explain this to me.

Section 4 of xml:id states:

An xml:id processor must assure that the following constraints hold for all xml:id attributes:

* The normalized value of the attribute is an NCName according to the Namespaces in XML Recommendation which has the same version as the document in which this attribute occurs (NCName for XML 1.0, or NCName for XML 1.1).

However the very first test case normal_001 uses a non-NCName and apparently expects this test to pass:

<doc>
<para xml:id=" te st ">MATCH</para>
</doc>

In the catalog this is listed as

<test-case category="normalize" id="normal_001">
<file-path>tests</file-path>
<creator>Norman Walsh</creator>
<date>2005-01-25</date>
<purpose>Check ID normalization</purpose>
<spec-citation place="4" type="section" version="1.0" spec="xml:id"/>

<scenario operation="standard">
<input-file>001_normalize.xml</input-file>
<id>te st</id>
<result>xml:id on para is an ID (te st)</result>
<notes>XSLT cannot perform this test.</notes>
</scenario>
</test-case>

However a probably older version of the catalog I find laying around on my hard drive lists this as an error condition. i.e. the value of the operation attribute of the scenario element is error, not standard.

Can anyone shed some light on this? What is supposed to happen here? Is the test suite wrong or the spec? Or are they consistent in a way I'm not seeing?

--
Elliotte Rusty Harold elharo AT metalab.unc.edu
XML in a Nutshell 3rd Edition Just Published!
http://www.cafeconleche.org/books/xian3/
http://www.amazon.com/exec/obidos/ISBN=0596007647/cafeaulaitA/ref=nosim




Archive powered by MHonArc 2.6.24.

Top of Page