<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" exclude-result-prefixes="xs" version="2.0">
<xsl:template match="/"> <xsl:result-document href="{//Rendition/@ISBN}.xml"> <Extract> <xsl:apply-templates select="//Series[not(@Type='Sub Series')]"/> <xsl:apply-templates select="//Series[@Type='Sub Series']"/> <xsl:apply-templates select="//Edition"/> </Extract> </xsl:result-document> </xsl:template>
...
</xsl:stylesheet><x:description xmlns:x="http://www.jenitennison.com/xslt/xspec" stylesheet="../../Extract.xsl"> <x:scenario label="Series"> <x:context href="XML-Samples/file.xml"/> <x:expect label="if Series information exists, include in extract retaining 'ID' attribute" test="exists(/GenericXMLExtract/Series[not(@Type)][@ID='15427'])"/> <x:expect label="if Series has EISSN and ISSN information, retain as attributes" test="exists(/GenericXMLExtract/Series[@ID='15427'][@EISSN='2522-8609'][@ISSN='2522-8595'])"/> ... </x:scenario>
</x:description><xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"xmlns:xs="http://www.w3.org/2001/XMLSchema"exclude-result-prefixes="xs"version="2.0"><xsl:template match="/"><xsl:result-document href="{//Rendition/@ISBN}.xml">
<xsl:call-template name="document-node-handler" /></xsl:result-document></xsl:template><xsl:template name="document-node-handler">
<Extract><xsl:apply-templates select="//Series[not(@Type='Sub Series')]"/>
...</Extract></xsl:template></xsl:stylesheet>
<x:description xmlns:x="http://www.jenitennison.com/xslt/xspec" stylesheet="../../Extract.xsl"><x:scenario label="Series"><x:context href="XML-Samples/file.xml"/>
<x:call template="document-node-handler"/>
<x:expect label="if Series information exists, include in extract retaining 'ID' attribute" test="exists(/GenericXMLExtract/Series[not(@Type)][@ID='15427'])"/>
...</x:scenario></x:description>