Document Identity Conformance Test

[ICO]NameLast modifiedSizeDescription

[DIR]Parent Directory  -  
[   ]dummy.xml08-Nov-2001 15:12 47  
[   ]genid.xsl29-Dec-2002 03:19 9.7K 

genid.xsl: This stylesheet tests an XSLT processor's handling of document identity. It requires that the processor be conformant in its implementation of generate-id(), document(), URI resolution, and stylesheet caching. It is intended for use by XSLT processor vendors.

To use it, you must pass 2 stylesheet parameters: src-uri and sty-uri, which are the absolute URIs of the source doc and stylesheet doc that you are using. These should be the same as the URIs you use when you invoke the processor.

Establishing the correct absolute URIs requires some knowledge of how your local filesystem paths map to URIs, and it is quite possible that no matter what URIs you supply as parameters, the processor will fail to recognize them as being the URIs of the actual source doc & stylesheet, because it didn't map them in the same way you assumed it would.

A processor should, however, have no trouble recognizing when a URI is identical to the one given for the source doc or stylesheet, no matter where the URI is encountered (i.e., even if it is given as a relative reference that, when resolved to absolute form, ends up being the same URI).

Some sample command lines follow. Of course you will have to adjust the URIs for your system. Vendors should test different ways of supplying the actual docs (filename only vs full URI), as well as what happens when the source doc and the stylesheet are the same document.

4Suite 1.0a1
4xslt -Dsrc-uri=file:///home/mike/xml/test/dummy.xml -Dsty-uri=file:///home/mike/xml/test/genid.xsl file:///home/mike/xml/test/dummy.xml file:///home/mike/xml/test/genid.xsl

Saxon 6.5.2 ('saxon' = 'java com.icl.saxon.Stylesheet')
saxon file:///home/mike/xml/test/dummy.xml file:///home/mike/xml/test/genid.xsl src-uri=file:///home/mike/xml/test/dummy.xml sty-uri=file:///home/mike/xml/test/genid.xsl

Xalan-J 2.4.1 ('xalan' = 'java org.apache.xalan.xslt.Process')
xalan -IN file:///home/mike/xml/test/dummy.xml -XSL file:///home/mike/xml/test/genid.xsl -PARAM src-uri file:///home/mike/xml/test/dummy.xml -PARAM sty-uri file:///home/mike/xml/test/genid.xsl

MSXML 3.0 ('msxsl' = msxsl.exe from msdn.microsoft.com)
msxsl "file:///C|/dev/test/dummy.xml" "file:///C|/dev/test/genid.xsl" src-uri="file:///C|/dev/test/dummy.xml" sty-uri="file:///C|/dev/test/genid.xsl"