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 3083 - [XSLT] escape-uri-attributes or include-content-type specified for xml output method
Summary: [XSLT] escape-uri-attributes or include-content-type specified for xml output...
Status: CLOSED FIXED
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: XSLT 2.0 (show other bugs)
Version: Candidate Recommendation
Hardware: All 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: 2006-04-04 19:34 UTC by Joanne Tong
Modified: 2006-06-21 11:45 UTC (History)
0 users

See Also:


Attachments

Description Joanne Tong 2006-04-04 19:34:39 UTC
Section 5.1.12 (XML Output Method: the escape-uri-attributes Parameter) and section 5.1.13 (XML Output Method: the include-content-type Parameter) in Serialization contain the following sentence:

"It is the responsibility of the host language to specify whether an error occurs if this parameter is specified in combination with the XML output method, or if the parameter is simply dropped."

XSLT 2.0 specification does not specifically say what happens if the output method is 'xml' and escape-uri-attributes or include-content-type are specified.

thanks,
Joanne Tong
Comment 1 Michael Kay 2006-05-05 08:38:17 UTC
The WG agreed that this should be an error and asked the editor to draft suitable text, checking first that all similar consistency issues are handled in the same way.

I think the general rule should be: if the xsl:output method is explicitly specified, and if a value is explicitly specified for a serialization parameter that is not applicable to this output method, then:

* if the xsl:output declaration defining the output method has higher import precedence than the declaration specifying the inapplicable parameter, the inapplicable parameter is ignored [the reason for this rule is that it otherwise becomes impossible for an importing stylesheet to change the output method]

* otherwise a static error (XTST1565) is signaled.

This applies to the following combinations:

Method       Inapplicable parameters
======       =======================

XML          escape-uri-attributes, include-content-type

XHTML        (none)

HTML         omit-xml-declaration, standalone

TEXT         version, indent, cdata-section-elements, 
             omit-xml-declaration, standalone, 
             doctype-system, doctype-public,
             undeclare-prefixes, escape-uri-attributes,
             include-content-type

Michael Kay 
Comment 2 Michael Kay 2006-06-15 19:15:44 UTC
An update on this. Following discussion at a WG telcon, I decided to anticipate a formal WG decision on this issue by including a potential resolution in the 8 June draft. This resolution had been discussed but had not yet been agreed. The draft includes a note (in J2.4: search for 3083) saying that this resolution is provisional. The places affected by the change can be found by searching for the word "inapplicable".

The proposed resolution is that serialization properties that are inapplicable to the selected output method are ignored, except that the processor may (optionally) validate their values. The reason this resolution was favoured in discussion is that there are many ways output properties can be overridden: not only via import precedence as discussed in comment #1, but also via xsl:result-document, and perhaps via an API. If the user chooses to override output method XHTML by HTML say, then it seems to make sense for other properties that aren't relevant to HTML to be simply ignored.

The WG has not yet made a formal decision on this proposal.