Bug 20291 - [XT3TS] assert-serialization
[XT3TS] assert-serialization
Status: NEW
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: XSLT 3.0 Test Suite
Working drafts
PC Windows NT
: P2 normal
: ---
Assigned To: Abel Braaksma
Mailing list for public feedback on specs from XSL and XML Query WGs
Depends on:
  Show dependency treegraph
Reported: 2012-12-07 12:33 UTC by Tim Mills
Modified: 2013-09-24 15:41 UTC (History)
1 user (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Tim Mills 2012-12-07 12:33:31 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.
Comment 1 Michael Kay 2012-12-07 14:11:32 UTC
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.
Comment 2 Tim Mills 2012-12-10 13:18:02 UTC
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.
Comment 3 Tim Mills 2012-12-10 13:31:55 UTC
sequence-0601.xsl is another.
Comment 4 Tim Mills 2012-12-11 10:42:39 UTC
attribute-set-0301 and 0701 are similarly affected.
Comment 5 Tim Mills 2012-12-11 15:59:12 UTC
bug-0701 is another.
Comment 6 Tim Mills 2012-12-18 14:17:47 UTC
validation-0202 has a similar problem.
Comment 7 Tim Mills 2012-12-20 10:32:17 UTC
for-each-group-026 is similar.
Comment 8 Tim Mills 2012-12-20 15:35:52 UTC
function-0501 and 0701 are also affected.
Comment 9 Abel Braaksma 2013-09-24 15:41:26 UTC
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.