I use xspec for testing of stylesheets. Most of the time it works fine, but once in a while tests fail without a valid reason: the expected and the actual result are the same. Seemingly: everything is green in the comparison screen. In that case, I mostly get it working again after trying all kinds of things, but without knowing what change 'did it'.
It would be most helpful if xspec would report the reason of the failure, but if you can help me (instead of the xspec output) to shine some light on this, I'd be very happy.
This is a reduced test case: xsl:
<xsl:stylesheet version="2.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:uc="http://www.infinity-loop.de/namespace/upcast/4.0/"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:html="http://www.w3.org/HTML/1998/html4"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
exclude-result-prefixes="uc xlink html xs xsl">
<xsl:output method="xml" version="1.0" encoding="utf-8" indent="yes"/>
<xsl:template match="bezwaar">
<xsl:variable name="content">
<xsl:element name="{name()}">
<xsl:apply-templates select="@*|node()"/>
</xsl:element>
</xsl:variable>
<xsl:copy-of select="$content"/>
</xsl:template>
<xsl:template match="@*" >
<xsl:attribute name="{name()}" namespace="{namespace-uri()}">
<xsl:value-of select="." />
</xsl:attribute>
</xsl:template>
<xsl:template match="*">
<xsl:element name="{name()}" namespace="{namespace-uri()}">
<xsl:apply-templates select="@*|node()" />
</xsl:element>
</xsl:template>
</xsl:stylesheet>
xspec:
<?xml version="1.0" encoding="UTF-8"?>
<x:description
xmlns:x = "http://www.jenitennison.com/xslt/xspec"
stylesheet="file:/home/rdgon/project/kraak/kraak-xslt/publicatiebladen/staatscourant/stcrt_step2.xsl">
<x:param name='ns' select="false()"/>
<x:scenario label='test'>
<x:scenario label='werkt dit'>
<x:context><bezwaar>
<al>Noem in het bezwaarschrift:</al>
<al nadruk="cur">Vergeet niet te ondertekenen.</al>
</bezwaar>
</x:context>
<x:expect>
<bezwaar>
<al>Noem in het bezwaarschrift:</al>
<al nadruk="cur">Vergeet niet te ondertekenen.</al>
</bezwaar>
</x:expect>
</x:scenario>
</x:scenario>
</x:description>
Can you explain what I am failing to see?
Ruud