Testing Tool output

For hcixlttest output, content matching the wildcard is printed with the wildcard address.

For example, the input is:

<root xmlns="primaryns" xmlns:ns1="otherns">
        <child>normalchild</child>
        <ns1:otherchild>
                <ns1:mywildcard/>
        </ns1:otherchild>
</root>

Th schema used is:

<xsd:element name="root">
        <xsd:complexType>
                <xsd:sequence>
                        <xsd:element name="child"/>
                        <xsd:any namespace="##other"/>
                </xsd:sequence>
        </xsd:complexType>
</xsd:element>

The testing output is similar to:

Command output:
MESSAGE 1
root.child.#text:    >normalchild<
root.##any:    ><ns1:otherchild><ns1:mywildcard/><ns1:otherchild><
Note:  The XML string that is matched to a wildcard explicitly contains namespace declarations for all namespaces used by elements and attributes inside the wildcard XML. In this way, xmlns attributes maybe inserted if namespaces used by the wildcard elements are originally declared in an upper level. With this, any users or systems can determine all namespace references by looking at the XML string that is matched to the wildcard.

In the previous example, the namespace declaration is:

xmlns:ns1-"otherns"

This is added to:

root.##any

The result is that all namespace mappings in this XML string are fully defined:

<ns1:otherchild xmlns:ns1="otherns"><ns1:mywildcard/><ns1:otherchild>