This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 23227 - [XT30] xsl:output
Summary: [XT30] xsl:output
Status: CLOSED FIXED
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: XSLT 3.0 (show other bugs)
Version: Candidate Recommendation
Hardware: Other All
: P2 normal
Target Milestone: ---
Assignee: Michael Kay
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-09-12 19:00 UTC by Tim Mills
Modified: 2014-05-15 14:00 UTC (History)
0 users

See Also:


Attachments

Description Tim Mills 2013-09-12 19:00:48 UTC
Suppose we have an XSLT 2.0 stylesheet xhtml.xsl which has an xsl:output declaration specifying HTML output with the DOCTYPE public and system identifiers from XHTML Strict 1.0.

At a later date, we try to reuse this stylesheet via an xsl:import, but change the output to be HTML 5, with a DOCTYPE of the form <!DOCTYPE HTML> (I.e. no system or public identifier).  For this to happen, the doctype-public and doctype-system properties must be absent in the xsl:output declaration.

This appears to be impossible since the doctype-public and doctype-system properties can't be reset to be absent in the importing stylesheet.  They will have values merged from the imported xhtml.xsl.

(I believe that specifying doctype-system="" does not have effect of making it absent, but rather sets it o the empty string.)
Comment 1 Michael Kay 2013-09-13 08:17:48 UTC
I agree. This has been raised before and I thought we had fixed it, but I can't see any evidence either of the fix or of the earlier discussion. 

(Saxon in fact behaves the way you are suggesting: a zero length string for doctype-system or doctype-public is interpreted as "absent". A deliberate non-conformance, and I don't do that without a very strong reason.).
Comment 2 Tim Mills 2013-09-13 08:29:18 UTC
Thanks.  Is that likely to make its way into the specification?  If so, I'll follow suit.
Comment 3 Michael Kay 2013-09-14 09:09:16 UTC
It appears that we made a decision on this:

https://www.w3.org/Bugs/Public/show_bug.cgi?id=5893

but as far as I can see the decision is not reflected in the current specification.
Comment 4 Michael Kay 2013-09-14 09:14:52 UTC
Incidentally, the fact that a bugzilla search for "doctype-system" fails to find bug 5893 would seem worthy of a bug report in its own right.
Comment 5 Michael Kay 2013-09-23 17:04:05 UTC
I have now applied the change that was agreed in erratum E32, in response to bug 5893, bringing the 3.0 spec into line with the 2.0 PER.