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 1220 - Serialization - choice of quotes on attributes
Summary: Serialization - choice of quotes on attributes
Status: CLOSED FIXED
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: Serialization 1.0 (show other bugs)
Version: Last Call drafts
Hardware: PC Windows XP
: P2 normal
Target Milestone: ---
Assignee: Scott Boag
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-04-06 21:12 UTC by Michael Kay
Modified: 2005-08-17 14:57 UTC (History)
0 users

See Also:


Attachments

Description Michael Kay 2005-04-06 21:12:12 UTC
In serialization section 4, phase 2f states:

If a quote (") character is in an attribute, and the attribute is delimited by
quote, the character will be changed to an an apostrophe ('). Likewise, if a
apostrophe (') character is in an attribute, and the attribute is delimited by
apostrophe, the character will be changed to an an quote (").

I'm sure the intention here is to change the attribute delimiters, not the
attribute value; but that's not how it reads. Change both occurrences of "the
character will be changed" to "the delimiter will be changed". Add, for
completeness. "If both characters are present in an attribute value, one of them
will be escaped."
Comment 1 Scott Boag 2005-04-07 00:20:26 UTC
"Michael Rys" <mrys@microsoft.com> wrote:
The intent as far as I understand XML serializers is to change the
character and not the quotes (since you may write the quote before you
have seen the full value of the attribute!).
Comment 2 Scott Boag 2005-04-28 16:19:43 UTC
from http://lists.w3.org/Archives/Member/w3c-xsl-wg/2005Apr/0030.html:

MK reports: ' In serialization section 4, phase 2f states:
If a quote (") character is in an attribute, and the attribute is delimited by
quote, the character will be changed to an an apostrophe ('). Likewise, if a
apostrophe (') character is in an attribute, and the attribute is delimited by
apostrophe, the character will be changed to an an quote (").

I'm sure the intention here is to change the attribute delimiters, not the
attribute value; but that's not how it reads. Change both occurrences of "the
character will be changed" to "the delimiter will be changed". Add, for
completeness. "If both characters are present in an attribute value, one of them
will be escaped."'

MK: Character map use case, want to give user more control. It is clear that we
are referring to changing delimiters, not content, but this should be explicit.
MR: Added comment saying that this really did refer to content rather than
delimiters.  Streaming output scenario.
MK: Entitizing is fine, but doesn't work in character map use case where output
is not XML.

Joanne: Henry doesn't like this rule, would prefer parameter specifying which
type of delimiter to use.
MK: We can take this provision out of the spec, implementation is permitted to
fix delimiters, but user doesn't have predictability.  We should all agree that
serializer can't change content except by escaping.

PC: Proposal is to drop this paragraph entirely.

Anders: Proposes change to SHOULD.
PC: This used to say "should", we changed it to "will".
Scott: Changed December 8.

Karun, Joanne, MR agree to drop.

RESOLUTION: " http://www.w3.org/Bugs/Public/show_bug.cgi?id=1220  Serialization
- choice of quotes on attributes" is resolved. Offending paragraph will be deleted.