Bugzilla – Bug 20291
Last modified: 2013-09-24 15:41:26 UTC
When a stylesheet has no xsl:output element, or has an xsl:output which does not have an @indent attribute, should we assume that it is @indent = 'no'? The test suite seems inconsistent.
This has an effect on tests using assert-serialization.
The spec says, of the indent attribute:
The default value is yes in the case of the html and xhtml output methods, no in the case of the xml output method.
Although it's possible to override the default externally, I think it's reasonable to assume that isn't going to happen. If no value is specified, we should assume the value as given.
There are a number of tests which use HTML serialization and either do not state @indent = "no" or explicitly state @indent = "yes".
Some have rather large expected results, and it seems unlikely that two processors will produce exactly the same output. As these tests don't seem to be aiming to test HTML indentation per se, may I suggest that these use indent = "no" to make automated testing of the result that little bit easier?
One such test is validation-0201.
If you agree, I'll make the change and list the affected tests here.
sequence-0601.xsl is another.
attribute-set-0301 and 0701 are similarly affected.
bug-0701 is another.
validation-0202 has a similar problem.
for-each-group-026 is similar.
function-0501 and 0701 are also affected.
The proper take on this seems to be to use XPath assertions to test the output, as opposed to rely on serialization attributes like indentation. For readability, it has an advantage though to use indented expected output.
We'll go over tests that affect this and update them accordingly.