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 1881 - separator automatism does more harm than it helps
Summary: separator automatism does more harm than it helps
Status: CLOSED WONTFIX
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: XSLT 2.0 (show other bugs)
Version: Last Call drafts
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: Usability
Depends on:
Blocks:
 
Reported: 2005-08-23 06:25 UTC by Stefan Wachter
Modified: 2005-10-13 09:03 UTC (History)
0 users

See Also:


Attachments

Description Stefan Wachter 2005-08-23 06:25:01 UTC
I work now with the Saxon XSLT 2.0 processor for about 9 months and do some
rather complicated transforms. Once and again separators that are automatically
inserted between sequence items when they are transformed into text nodes bite me.

Therefore I kindly ask, if it would make sense to have an output attribute that
globally sets the default separator. This would enable people to decide wheter
they want to use the tricky separator automatism or not.

Thanks for your attention,
Stefan Wachter
Comment 1 Michael Kay 2005-09-28 14:02:07 UTC
We do recognize that there are usability problems concerned with the
insertion (or non-insertion) of spaces between items in a sequence under
different circumstances. We have put quite a lot of work into this area,
trying to ensure that the specification is consistent across different
instructions while remaining backwards compatible, and that it usually does
what you would expect if you are not intimately familiar with the
specification. 

The basic principle is that spaces are inserted between atomic values, but not
between text nodes. The reason for the first rule is that a sequence of atomic
values is often used to construct list-valued elements or attributes, and this
reflects the relationship of sequences in our data model to list types in XML
Schema. The reason for the second rule is so that the traditional use of a
sequence of xsl:value-of and xsl:text instructions continues to work as it did
in XSLT 1.0. Users therefore need to understand the difference between strings
and text nodes. We do realise that this is a subtle distinction, but we think
this will just be something that new users have to learn. 

We don't think it would be right to change the behaviour of any existing
constructs: this will either create backwards compatibilities, or it will merely
shift the "surprises" from one use case to a different use case.

We don't think that adding any new global defaults will help. Global defaults
are best avoided where possible, because they can increase problems for users
when debugging (the cause of the problem is remote from the code being executed)
and when cutting-and-pasting code from one stylesheet to another. Also, they
only complicate things for users who haven't yet grasped the basic concepts.

We will review whether there is scope for adding extra examples to explain the
behavior more clearly.

We are changing the status to WONTFIX, and will close the bug. If you are not
satisfied with this response, please re-open the bug.

Michael Kay
for the XSL Working Group
Comment 2 Michael Kay 2005-10-13 09:03:34 UTC
In closing the bug, I reported that we would review whether it was possible to
add some examples to clarify the behavior. This comment is to record that
examples have indeed been added to sections 5.7.1 and 5.7.2 to illustrate the
way that whitespace separation works when the content consists of a sequence of
strings and when it consists of a sequence of text nodes. I hope this will lead
to a better understanding of the specification.

Michael Kay
XSLT 2.0 Editor