I'm writing a program that uses XSLT and need to test the contents of a result-document call in Xspec. In the example below, I would like to test the contents of result.xml. If this is possible, how do you do this?
XML: test.xml
<?xml version="1.0" encoding="UTF-8"?>
<root></root>
XSLT: result-document.xsl
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
version="2.0">
<xsl:template match="/root">
<xsl:result-document href="result.xml">
<my-result></my-result>
</xsl:result-document>
</xsl:template>
</xsl:stylesheet>
XSpec:
<x:description xmlns:x="http://www.jenitennison.com/xslt/xspec" stylesheet="result-document.xsl">
<x:scenario label="Test result document">
<x:context href="test.xml"></x:context>
<!-- How do you test the result.xml file here? -->
<x:expect label="test result">
<my-result></my-result>
</x:expect>
</x:scenario>
</x:description>