XInclude Test Suite
| A Joint Development Effort |
|
W3C XML Core Working Group
XInclude 1.0 Test Suite
27
September 2006
- This version:
-
- Current version:
-
- W3C XML Core Working Group:
-
- XML Inclusions(XInclude) Version 1.0:
-
- Comments:
-
Table of Contents
- Introduction
- Test Case Descriptions
- Contributors
1. Introduction
XInclude is a generic mechanism that is used to merge XML documents. XInclude uses
elements, attributes and URI references which are existing XML constructs.
Conformance tests can be used by developers, content creators, and
users alike to increase their level of confidence in product quality. In
circumstances where interoperability is necessary, these tests can also
be used to determine that differing implementations support the same set
of features.
This report provides supporting documentation for all of the tests
contributed by members of the W3C XML Core Working Group.
Sources from which these tests have been collected
include: Redhat; FourThought; NIST; LTG, Edinburgh Univ; Elliotte Rusty Harold; . It is anticipated that this report will supplement the actual tests.
Comments/suggestions should be
forwarded to the public XInclude comments mailing list.
2. Test Case Description
This section of this report contains descriptions of test cases,
each test case includes a binary test. The test suite consists of a
series of simple binary conformance tests, whereby a processor is deemed
either to accept (a positive test) or reject (a negative test) the test.
An expected result document is provided for the positive tests to compare
the output of the processor with the reference file.
Expected results are as accurate as possible, it is conceivable that a
few files may diverge somewhat from the testcase description, however
the idea is still captured. Negative tests are intended to
identify expected errors as defined by the specification. Negative test are not
accompanied by expected results.
For an implementation to claim conformance it must pass all positive and negative
testcases, which means that the implementation performed exactly as expected.
A description for each test is presented in the following table as well as a
section identifier from the XInclude recommendation and the Collection from
which the test was originated. The test description is intended to have enough
detail to evaluate diagnostic messages. Given the Test ID and the Collection,
each test can be uniquely identified.
|
|
Simple test of including another XML document.
There is an output test associated with this input file.
|
|
|
Test recursive inclusion.
There is an output test associated with this input file.
|
|
|
Simple test of including a set of nodes from an XML document.
There is an output test associated with this input file.
|
|
|
including another XML document with IDs
There is an output test associated with this input file.
|
|
|
Simple test of including another text document
There is an output test associated with this input file.
|
|
|
Simple test of a fallback on unavailable URI.
There is an output test associated with this input file.
|
| Sections [Rules]: |
3.2 |
| Test ID: |
imaq-pex1-01 |
| Collection: |
Redhat |
|
Unused fallbacks must not generate errors, even if broken.
There is an output test associated with this input file.
|
| Sections [Rules]: |
3.2 |
| Test ID: |
imaq-pex1-02 |
| Collection: |
Redhat |
|
Broken fallback must generate errors, if they're needed.
|
| Sections [Rules]: |
4.3 |
| Test ID: |
imaq-pex6-03 |
| Collection: |
Redhat |
|
A BOM in UTF16 is not added to the resulting document.
There is an output test associated with this input file.
|
| Sections [Rules]: |
4.3 |
| Test ID: |
imaq-pex6-04 |
| Collection: |
Redhat |
|
A BOM in UTF16LE is added to the resulting document.
There is an output test associated with this input file.
|
|
|
'accept' attributes with characters outside the range #x20 through #x7E must
be flagged as fatal errors.
|
|
|
Simple test of including another XML document.
There is an output test associated with this input file.
|
|
|
Test recursive inclusion.
There is an output test associated with this input file.
|
|
|
Simple test of including another text document.
There is an output test associated with this input file.
|
|
|
Simple test of including a set of nodes from an XML document.
There is an output test associated with this input file.
|
|
|
Simple test of including a set of nodes from an XML document.
There is an output test associated with this input file.
|
|
|
Simple test of including a set of nodes from an XML document.
There is an output test associated with this input file.
|
|
|
Simple test of including a set of nodes from an XML document.
There is an output test associated with this input file.
|
|
|
Test the inclusion of another XML document.
There is an output test associated with this input file.
|
|
|
Test that the encoding attribute in the Xinclude element has no effect when parse="xml".
There is an output test associated with this input file.
|
|
|
Test that values other than xml or text, in the parse attribute of the XInclude
element, result in fatal errors.
|
|
|
Test of fallback element appearing as a child of an xinclude element.
There is an output test associated with this input file.
|
|
|
Test a fallback element not appearing as a direct
child of an xinclude element. A fatal error should be generated.
|
|
|
Test a fallback when a resource error occurs.
There is an output test associated with this input file.
|
|
|
Test an empty fallback element. The xinclude element is
removed from the results.
There is an output test associated with this input file.
|
|
|
Test of a fallback element missing from the
include element. A resource error results in a fatal error.
|
|
|
Test unqualified attributes in the include element. They must be ignored.
There is an output test associated with this input file.
|
|
|
Test content other than the fallback, in the xinclude element.
This content must be ignored.
There is an output test associated with this input file.
|
|
|
Test a resource containing non-well-formed XML. The inclusion results in a fatal error.
|
|
|
Test that is a fatal error for an include element to contain more than one fallback elements.
|
|
|
Test a fallback element containing markup when parse="text".
There is an output test associated with this input file.
|
|
|
Test a fallback element containing markup when parse="text".
There is an output test associated with this input file.
|
|
|
It is illegal for an include element to point to itself, when parse="xml".
|
|
|
Test a document type declaration information item child
in the resource information set. the DTD should be excluded for inclusion in the source infoset.
There is an output test associated with this input file.
|
|
|
Test intra-document reference within include elements.
There is an output test associated with this input file.
|
|
|
Simple test of including a set of nodes from an XML document.
There is an output test associated with this input file.
|
|
|
Test the inclusion of a set of nodes from an XML document.
There is an output test associated with this input file.
|
|
|
Test an include location identifying a document information item with
an xpointer locating the document root. In this case
the set of top level include items is the children of acquired infoset's
document information item, except for the document type information
item.
There is an output test associated with this input file.
|
|
|
Including an XML document with an unparsed entity.
There is an output test associated with this input file.
|
|
|
Testing when the document (top level) element in the source infoset is an
include element.
There is an output test associated with this input file.
|
|
|
Testing an include element in the document (top-level) element in the source doc.
Test should fail because is including more than one element.
|
|
|
Testing an include element in the document (top-level) element in the source doc.
Test should fail because is including only a processing instruction.
|
|
|
Testing an include element in the document (top-level) element in the source doc.
Test should fail because is including only a comment.
|
|
|
Test relative URI references in the included infoset.
There is an output test associated with this input file.
|
|
|
Test that the encoding attribute when parse="xml" does not translate the incoming document.
There is an output test associated with this input file.
|
|
|
including another XML document with IDs, using a shorthand pointer.
There is an output test associated with this input file.
|
|
|
including another XML document with IDs, using a shorthand pointer.
There is an output test associated with this input file.
|
|
|
Including another XML document with IDs, using a shorthand pointer.
There is an output test associated with this input file.
|
|
|
Including an XML document using an XPointer element scheme.
There is an output test associated with this input file.
|
|
|
Including an XML document using an XPointer element scheme.
|
|
|
Including an XML document using an XPointer element scheme.
|
|
|
Including another XML document with ids using XPointer element scheme.
There is an output test associated with this input file.
|
|
|
Including an XML document using an XPointer element scheme.
There is an output test associated with this input file.
|
|
|
Including an XML document using an XPointer element scheme.
There is an output test associated with this input file.
|
|
|
Including another XML document using XPointer Framework scheme-base pointer.
If the processor does not support the scheme used in a pointer part, it skip that pointer part.
There is an output test associated with this input file.
|
|
|
Including another XML document using XPointer Framework.
If the processor does not support the scheme used in a pointer part, it skip that pointer part.
There is an output test associated with this input file.
|
|
|
Testing the content of the xinclude element.
The comment should be ignored .
There is an output test associated with this input file.
|
|
|
Testing the content of the xinclude element.
The element should be ignored .
There is an output test associated with this input file.
|
|
|
Testing the content of the xinclude element.
This test should result in a fatal error.
|
|
|
Testing the content of the xinclude element.
The xinclude element may contain a fallback element;
other elements from the xinclude namespace result in a fatal error.
|
|
|
Testing the content of the xinclude element.
The content must be one fallback. This test should result in a fatal error.
|
|
|
Test a resource that contains not-well-formed XML.
This test should result in a fatal error.
|
|
|
Test a resource that contains not-well-formed XML.
This test should result in a fatal error.
|
|
|
Testing the content of the xinclude element.
The xinclude element may contain a fallback element; other elements from the xinclude namespace result in a fatal error.
|
|
|
Testing the content of the xinclude element.
The xinclude element may contain a fallback element; other elements from the xinclude namespace result in a fatal error.
|
|
|
It is a fatal error to resolve an xpointer scheme on a document
that contains unexpanded entity reference information items.
|
|
|
The unexpanded entity reference information items, if present in the source infoset,
will appear in the result infoset.
There is an output test associated with this input file.
|
|
|
Test an include location identifying the document information item without an Xpointer,
The set of top-level included items should be the children of the acquired inforset's document
information item, except for the document type declaration information item.
There is an output test associated with this input file.
|
|
|
Test an include location having an XPointer identifying a comment.
The set of top-level included items should consist of the information item corresponding
to the comment node in the acquired infoset.
There is an output test associated with this input file.
|
|
|
Test an include location having an XPointer identifying a processing instruction.
The set of top-level included items should consist of the information item corresponding
to the processing instruction node in the acquired infoset.
There is an output test associated with this input file.
|
|
|
Test that an include location identifying an attribute node will result in a
fatal error.
|
|
|
Test that an include location identifying an attribute node will result in a
fatal error.
|
|
|
Including a duplicate unparsed entity.
Test should ignore duplicate unparsed entity.
There is an output test associated with this input file.
|
|
|
Including an unparsed entity with same name,
but different sysid. Test should fail.
|
| Sections [Rules]: |
4.2 |
| Test ID: |
eduni-1 |
| Collection: |
LTG, Edinburgh Univ |
|
Simple whole-file inclusion.
There is an output test associated with this input file.
|
| Sections [Rules]: |
4.2 |
| Test ID: |
eduni-2 |
| Collection: |
LTG, Edinburgh Univ |
|
Verify that xi:include elements in the target have been processed in the acquired infoset, ie before the xpointer is applied.
There is an output test associated with this input file.
|
| Sections [Rules]: |
4.2 |
| Test ID: |
eduni-3 |
| Collection: |
LTG, Edinburgh Univ |
|
Check xml:lang fixup
There is an output test associated with this input file.
|
| Sections [Rules]: |
4.1 |
| Test ID: |
harold-01 |
| Collection: |
Elliotte Rusty Harold |
|
xml:base attribute is used to resolve relative URLs in href attributes
There is an output test associated with this input file.
|
| Sections [Rules]: |
4.2.5 |
| Test ID: |
harold-02 |
| Collection: |
Elliotte Rusty Harold |
|
Use XPointer to include an include element in another document,
and make sure that's fully resolved too
There is an output test associated with this input file.
|
| Sections [Rules]: |
4.1 |
| Test ID: |
harold-03 |
| Collection: |
Elliotte Rusty Harold |
|
xml:base attribute on the xi:include element is used to resolve relative URL in href
There is an output test associated with this input file.
|
| Sections [Rules]: |
4.1 |
| Test ID: |
harold-04 |
| Collection: |
Elliotte Rusty Harold |
|
xml:base attribute from an unincluded element
still applies to its included descendants
There is an output test associated with this input file.
|
| Sections [Rules]: |
4.2 |
| Test ID: |
harold-05 |
| Collection: |
Elliotte Rusty Harold |
|
An include element includes its following sibling element, which has a child
include element including the sibling element after that one.
There is an output test associated with this input file.
|
| Sections [Rules]: |
4.2 |
| Test ID: |
harold-06 |
| Collection: |
Elliotte Rusty Harold |
|
Include a document that uses XPointers to reference various parts of itself
There is an output test associated with this input file.
|
| Sections [Rules]: |
4.5.6 |
| Test ID: |
harold-07 |
| Collection: |
Elliotte Rusty Harold |
|
xml:lang attribute from including document does not override xml:lang attribute in included document
There is an output test associated with this input file.
|
| Sections [Rules]: |
4.5.6 |
| Test ID: |
harold-08 |
| Collection: |
Elliotte Rusty Harold |
|
xml:lang attribute is added to retain the included element's language, even
though the language was originaly declared on an unincluded element
There is an output test associated with this input file.
|
| Sections [Rules]: |
4.5.6 |
| Test ID: |
harold-09 |
| Collection: |
Elliotte Rusty Harold |
|
xml:lang='' is added when the included document does not declare a language
and the including element does
There is an output test associated with this input file.
|
| Sections [Rules]: |
4.1 |
| Test ID: |
harold-10 |
| Collection: |
Elliotte Rusty Harold |
|
Test that the
xml:base attribute is not used to resolve a missing href.
According to RFC 2396 empty string URI always refers to the current document irrespective of base URI.
There is an output test associated with this input file.
|
| Sections [Rules]: |
3.1 |
| Test ID: |
harold-11 |
| Collection: |
Elliotte Rusty Harold |
|
There's no difference between href="" and no href attribute.
There is an output test associated with this input file.
|
| Sections [Rules]: |
4.5.5 |
| Test ID: |
harold-12 |
| Collection: |
Elliotte Rusty Harold |
|
Make sure base URIs are preserved when including from the same document.
There is an output test associated with this input file.
|
| Sections [Rules]: |
3.1 |
| Test ID: |
harold-13 |
| Collection: |
Elliotte Rusty Harold |
|
Syntactically incorrect IRI is a fatal error (Eitehr I'm missing something or the spec needs to state this prinicple more
clearly.)
|
| Sections [Rules]: |
3.1 |
| Test ID: |
harold-14 |
| Collection: |
Elliotte Rusty Harold |
|
Syntactically incorrect IRI with an unrecognized scheme is a fatal error
|
| Sections [Rules]: |
4.2 |
| Test ID: |
harold-15 |
| Collection: |
Elliotte Rusty Harold |
|
Syntactically correct IRI with an unrecognized scheme is a resource error
There is an output test associated with this input file.
|
| Sections [Rules]: |
3.1 |
| Test ID: |
harold-16 |
| Collection: |
Elliotte Rusty Harold |
|
accept attribute contains carriage-return/linefeed pair
|
| Sections [Rules]: |
3.1 |
| Test ID: |
harold-17 |
| Collection: |
Elliotte Rusty Harold |
|
accept attribute contains Latin-1 character (non-breaking space)
|
| Sections [Rules]: |
3.1 |
| Test ID: |
harold-18 |
| Collection: |
Elliotte Rusty Harold |
|
Unprefixed, unrecognized attributes on an include element are ignored
There is an output test associated with this input file.
|
| Sections [Rules]: |
3.2 |
| Test ID: |
harold-19 |
| Collection: |
Elliotte Rusty Harold |
|
Fallback elements can be empty
There is an output test associated with this input file.
|
| Sections [Rules]: |
4.4 |
| Test ID: |
harold-20 |
| Collection: |
Elliotte Rusty Harold |
|
Included documents can themselves use fallbacks
There is an output test associated with this input file.
|