XInclude Test Suite

W3CNIST
A Joint Development Effort

W3C XML Core Working Group
XInclude 1.0 Test Suite
30 June 2004

This version:
Current version:
W3C XML Core Working Group:
XML Inclusions (XInclude) Version 1.0:
Comments:

Table of Contents

  1. Introduction
  2. Test Case Descriptions
  3. 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; University of Edinburgh. 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.

Sections [Rules]:4.2
Test ID:imaq-include-xml-01
Collection:Redhat

Simple test of including another XML document.

There is an output test associated with this input file.

Sections [Rules]:4.2.7
Test ID:imaq-include-xml-02
Collection:Redhat

Test recursive inclusion.

There is an output test associated with this input file.

Sections [Rules]:4.2.2
Test ID:imaq-include-xml-03
Collection:Redhat

Simple test of including a set of nodes from an XML document.

There is an output test associated with this input file.

Sections [Rules]:4.2
Test ID:imaq-include-xml-04
Collection:Redhat

including another XML document with IDs

There is an output test associated with this input file.

Sections [Rules]:4.3
Test ID:imaq-include-xml-05
Collection:Redhat

Simple test of including another text document

There is an output test associated with this input file.

Sections [Rules]:4.4
Test ID:imaq-include-xml-06
Collection:Redhat

Simple test of a fallback on unavailable URI.

There is an output test associated with this input file.

Sections [Rules]:3.1
Test ID:FourThought-include-01
Collection:FourThought

Simple test of including another XML document.

There is an output test associated with this input file.

Sections [Rules]:4.2.7
Test ID:FourThought-include-02
Collection:FourThought

Test recursive inclusion.

There is an output test associated with this input file.

Sections [Rules]:3.1
Test ID:FourThought-include-03
Collection:FourThought

Simple test of including another text document.

There is an output test associated with this input file.

Sections [Rules]:4.2.2
Test ID:FourThought-include-04
Collection:FourThought

Simple test of including a set of nodes from an XML document.

There is an output test associated with this input file.

Sections [Rules]:4.2.2
Test ID:FourThought-include-05
Collection:FourThought

Simple test of including a set of nodes from an XML document.

There is an output test associated with this input file.

Sections [Rules]:4.2.1
Test ID:FourThought-include-06
Collection:FourThought

Simple test of including a set of nodes from an XML document.

There is an output test associated with this input file.

Sections [Rules]:4.2.5
Test ID:FourThought-include-07
Collection:FourThought

Simple test of including a set of nodes from an XML document.

There is an output test associated with this input file.

Sections [Rules]:3.1
Test ID:Nist-include-01
Collection:NIST

Test the inclusion of another XML document.

There is an output test associated with this input file.

Sections [Rules]:3.1
Test ID:Nist-include-02
Collection:NIST

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.

Sections [Rules]:3.1
Test ID:Nist-include-03
Collection:NIST

Test that values other than xml or text, in the parse attribute of the XInclude element, result in fatal errors.

Sections [Rules]:3.2
Test ID:Nist-include-04
Collection:NIST

Test of fallback element appearing as a child of an xinclude element.

There is an output test associated with this input file.

Sections [Rules]:3.2
Test ID:Nist-include-05
Collection:NIST

Test a fallback element not appearing as a direct child of an xinclude element. A fatal error should be generated.

Sections [Rules]:3.2
Test ID:Nist-include-06
Collection:NIST

Test a fallback when a resource error occurs.

There is an output test associated with this input file.

Sections [Rules]:3.2
Test ID:Nist-include-07
Collection:NIST

Test an empty fallback element. The xinclude element is removed from the results.

There is an output test associated with this input file.

Sections [Rules]:3.2
Test ID:Nist-include-08
Collection:NIST

Test of a fallback element missing from the include element. A resource error results in a fatal error.

Sections [Rules]:3.1
Test ID:Nist-include-09
Collection:NIST

Test unqualified attributes in the include element. They must be ignored.

There is an output test associated with this input file.

Sections [Rules]:3.1
Test ID:Nist-include-10
Collection:NIST

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.

Sections [Rules]:4.2
Test ID:Nist-include-11
Collection:NIST

Test a resource containing non-well-formed XML. The inclusion results in a fatal error.

Sections [Rules]:4.4
Test ID:Nist-include-12
Collection:NIST

Test that is a fatal error for an include element to contain more than one fallback elements.

Sections [Rules]:4.4
Test ID:Nist-include-13
Collection:NIST

Test a fallback element containing markup when parse="text".

There is an output test associated with this input file.

Sections [Rules]:4.4
Test ID:Nist-include-14
Collection:NIST

Test a fallback element containing markup when parse="text".

There is an output test associated with this input file.

Sections [Rules]:4.2.7
Test ID:Nist-include-15
Collection:NIST

It is illegal for an include element to point to itself, when parse="xml".

Sections [Rules]:4.2.1
Test ID:Nist-include-16
Collection:NIST

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.

Sections [Rules]:4.5
Test ID:Nist-include-17
Collection:NIST

Test intra-document reference within include elements.

There is an output test associated with this input file.

Sections [Rules]:4.2.2
Test ID:Nist-include-18
Collection:NIST

Simple test of including a set of nodes from an XML document.

There is an output test associated with this input file.

Sections [Rules]:4.2.2
Test ID:Nist-include-19
Collection:NIST

Test the inclusion of a set of nodes from an XML document.

There is an output test associated with this input file.

Sections [Rules]:4.2.2
Test ID:Nist-include-20
Collection:NIST

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.

Sections [Rules]:4.5.1
Test ID:Nist-include-21
Collection:NIST

Including an XML document with an unparsed entity.

There is an output test associated with this input file.

Sections [Rules]:4.5
Test ID:Nist-include-22
Collection:NIST

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.

Sections [Rules]:4.5
Test ID:Nist-include-23
Collection:NIST

Testing an include element in the document (top-level) element in the source doc. Test should fail because is including more than one element.

Sections [Rules]:4.5
Test ID:Nist-include-24
Collection:NIST

Testing an include element in the document (top-level) element in the source doc. Test should fail because is including only a processing instruction.

Sections [Rules]:4.5
Test ID:Nist-include-25
Collection:NIST

Testing an include element in the document (top-level) element in the source doc. Test should fail because is including only a comment.

Sections [Rules]:4.5.5
Test ID:Nist-include-26
Collection:NIST

Test relative URI references in the included infoset.

There is an output test associated with this input file.

Sections [Rules]:3.1
Test ID:Nist-include-27
Collection:NIST

Test that the encoding attribute when parse="xml" does not translate the incoming document.

There is an output test associated with this input file.

Sections [Rules]:4.2
Test ID:Nist-include-28
Collection:NIST

including another XML document with IDs, using a shorthand pointer.

There is an output test associated with this input file.

Sections [Rules]:4.2
Test ID:Nist-include-29
Collection:NIST

including another XML document with IDs, using a shorthand pointer.

There is an output test associated with this input file.

Sections [Rules]:4.2
Test ID:Nist-include-30
Collection:NIST

Including another XML document with IDs, using a shorthand pointer.

There is an output test associated with this input file.

Sections [Rules]:4.2
Test ID:Nist-include-31
Collection:NIST

Including an XML document using an XPointer element scheme.

There is an output test associated with this input file.

Sections [Rules]:4.2
Test ID:Nist-include-32
Collection:NIST

Including an XML document using an XPointer element scheme.

Sections [Rules]:4.2
Test ID:Nist-include-33
Collection:NIST

Including an XML document using an XPointer element scheme.

Sections [Rules]:4.2
Test ID:Nist-include-34
Collection:NIST

Including another XML document with ids using XPointer element scheme.

There is an output test associated with this input file.

Sections [Rules]:4.2
Test ID:Nist-include-35
Collection:NIST

Including an XML document using an XPointer element scheme.

There is an output test associated with this input file.

Sections [Rules]:4.2
Test ID:Nist-include-36
Collection:NIST

Including an XML document using an XPointer element scheme.

There is an output test associated with this input file.

Sections [Rules]:4.2
Test ID:Nist-include-37
Collection:NIST

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.

Sections [Rules]:4.2
Test ID:Nist-include-38
Collection:NIST

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.

Sections [Rules]:3.1
Test ID:nist-include-39
Collection:NIST

Testing the content of the xinclude element. The comment should be ignored .

There is an output test associated with this input file.

Sections [Rules]:3.1
Test ID:nist-include-40
Collection:NIST

Testing the content of the xinclude element. The element should be ignored .

There is an output test associated with this input file.

Sections [Rules]:3.1
Test ID:nist-include-41
Collection:NIST

Testing the content of the xinclude element. This test should result in a fatal error.

Sections [Rules]:3.1
Test ID:Nist-include-42
Collection:NIST

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.

Sections [Rules]:3.1
Test ID:Nist-include-43
Collection:NIST

Testing the content of the xinclude element. The content must be one fallback. This test should result in a fatal error.

Sections [Rules]:4.2
Test ID:Nist-include-44
Collection:NIST

Test a resource that contains not-well-formed XML. This test should result in a fatal error.

Sections [Rules]:4.2
Test ID:Nist-include-45
Collection:NIST

Test a resource that contains not-well-formed XML. This test should result in a fatal error.

Sections [Rules]:3.1
Test ID:Nist-include-46
Collection:NIST

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.

Sections [Rules]:3.1
Test ID:Nist-include-47
Collection:NIST

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.

Sections [Rules]:4.2
Test ID:Nist-include-48
Collection:NIST

It is a fatal error to resolve an xpointer scheme on a document that contains unexpanded entity reference information items.

Sections [Rules]:4.5
Test ID:Nist-include-49
Collection:NIST

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.

Sections [Rules]:4.5
Test ID:Nist-include-50
Collection:NIST

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.

Sections [Rules]:4.2.5
Test ID:Nist-include-51
Collection:NIST

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.

Sections [Rules]:4.2.5
Test ID:Nist-include-52
Collection:NIST

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.

Sections [Rules]:4.2.6
Test ID:Nist-include-53
Collection:NIST

Test that an include location identifying an attribute node will result in a fatal error.

Sections [Rules]:4.2.6
Test ID:Nist-include-54
Collection:NIST

Test that an include location identifying an attribute node will result in a fatal error.

Sections [Rules]:4.5.1
Test ID:Nist-include-55
Collection:NIST

Including a duplicate unparsed entity. Test should ignore duplicate unparsed entity.

There is an output test associated with this input file.

Sections [Rules]:4.5.1
Test ID:Nist-include-56
Collection:NIST

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.

4. Contributors (Non-normative)

A team of volunteer members have participated in the development of this work. Contributions have come from: