The xml:id test suite

The xml:id test suite consists of thirteen tests and an XSL stylesheet which exercises them. Other methods, for example very recent versions of Amaya, may also be available.

The thirteen tests are:

normal_001; Check ID normalization

Expected result: xml:id on para is an ID (te st)

Notes: XSLT cannot perform this test.

undecl_001; Check that xml:id does not have to be declared

Expected result: xml:id on para is an ID (test)

declar_001; Check that xml:id can be declared correctly with a DTD

Expected result: xml:id on para is an ID (id)

declar_002; Check that xml:id can be declared correctly with a schema (requires W3C XML Schema support)

Expected result: xml:id on para is an ID (id)

Notes: Proper evaluation requires a schema-aware processor.

baddcl_001; Check that an incorrect DTD declaration is caught

Expected result: xml:id on para is an ID (id)

Notes: Must generate invalid declared type error.

dupdup_001; Test to see if duplicate IDs are detected.

Expected result: xml:id on para is an ID (dup)

Notes: Should generate duplicate ID error; may report both elements.

baddcl_002; Check that an incorrect schema declaration is caught (requires W3C XML Schema support)

Expected result: xml:id on para is an ID (id)

Notes: Must generate invalid declared type error; proper evaluation requires a schema-aware processor.

dupdup_002; Test to see if duplicate IDs are detected.

Expected result: id on para is an ID (id1) xml:id on para is an ID (id1)

Notes: Should generate duplicate ID error; may report both elements.

okchar_001; Check that an XML 1.0 document accepts 1.0 IDs

Expected result: xml:id on p is an ID (anid)

okchar_002; Check that an XML 1.1 document accepts 1.1 IDs (requires support for XML 1.1)

Expected result: xml:id on p is an ID (idⰀok)

Notes: Will fail if an XML 1.0 processor is used.

xref___001; Check that IDREFs work

Expected result: id on para is an ID (id1) xml:id on para is an ID (id2) Found para Found para

normal_002; Check that an ID is normalized

Expected result: xml:id on p is an ID (anid)

normal_003; Check that an ID is normalized

Expected result: xml:id on para is an ID ( p2)

Notes: XSLT cannot perform this test.

Additional information about these tests is available in the xml:id implementation report.