This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
The possible result for this test <assert-serialization><![CDATA[<out><a/></out>]]></assert-serialization> is incorrect. It should include an XML declaration. There are a number of other tests which might be similarly affected in _output-test-set.xml and _error-test-set.xml in which <assert-serialization> is used with no method and the transformation produces XML (not XHTML or HTML).
Fixed by changing the assert-serialization to assert-xml (which gets rid of the declaration by itself). It also appeared on error-1620b. Changes pushed. > There are a number of other tests which might be similarly affected in > _output-test-set.xml and _error-test-set.xml in which <assert-serialization> > is used with no method and the transformation produces XML (not XHTML or HTML). Leaving bug 'assigned', I have to look into those.
Confirmed fixed for error-1620b Thanks.
After some trial and error, I came up with the following query: /cat:test-set/cat:test-case [cat:result[assert-serialization [not(@method) or @method='xml'] [ (not(@file) and not(contains(., '?xml'))) or not(contains(unparsed-text(@file), '<?xml')) ] ]] [cat:test/cat:stylesheet [doc(@file)/(xsl:stylesheet|xsl:transform) [ empty(xsl:output | .//xsl:result-document) or (xsl:output | .//xsl:result-document)[@method='xml' or empty(@method)] [normalize-space(@omit-xml-declaration)=('no', 'false', '0')] ]] ] While I am not 100% sure the query is correct for all cases, it showed me three tests that were a candidate for incorrect settings: include-0101 output-0312 output-0313 For all three cases these were false negatives. The test was about testing import precedence and the effective setting of omit-xml-declaration was true. I'll resolve this bug as fixed, please reopen if you think the query above is wrong and/or if you find other tests that have the wrong serialized output as a result of the xml declaration.