[Bug 27258] [XSLT30] ambiguities in text in spec on @item-separator

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

Michael Kay <mike@saxonica.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED

--- Comment #2 from Michael Kay <mike@saxonica.com> ---
<quote setion="25">
The item-separator serialization parameter defined in [XSLT and XQuery
Serialization] is not available in xsl:output...
</quote>

This paragraph is clearly obsolete, because we allow
xsl:output/@item-separator. We should replace this paragraph with an
explanation of the effect of the attribute. As explained in 2.3.6, the
attribute has no effect if the transformation result is processed using result
tree construction followed by serialization (because there is then only one
item), but it does have effect if serialization is used without result tree
construction.

<quote section="2.6">
An XSLT stylesheet describes a process that constructs a set of final result
trees from a set of source trees.
</quote>

This section needs updating because the output is no longer always a set of
final result trees; it needs to recognize the possibility of producing "raw
output" (and optionally, serializing the raw output without first building a
tree).

<quote section="24.1">
The item-separator serialization parameter defined in [XSLT and XQuery
Serialization] is not available in xsl:result-document; it is not applicable,
because the sequence that is serialized by XSLT is always a singleton document
node.
</quote>

We allow item-separator on xsl:result-document, but I'm not sure it has any
effect. Currently we say that xsl:result-document always creates a tree and
optionally serializes it. If the thing being serialized is always a document
node, then it is a single item, so the item separator can have no effect. So we
should probably remove the possibility of specifying
xsl:result-document/@item-separator, unless we want to allow
xsl:result-document to produce "raw" output.

Serialization 3.1 defines a JSON serialization method, and although this makes
no use of item-separator, if a transformation is going to be able to write
multiple JSON output files then we need to allow xsl:result-document to produce
(and serialize) raw sequences without constructing a tree. Perhaps
xsl:result-document should have an attribute such as build-tree=yes|no, and
then item-separator makes sense if build-tree="no". For example, 

<xsl:result-document href="out.txt" method="text" build-tree="no"
item=separator="|">
  <xsl:sequence select= 1 to 5"/>
</xsl:result-document>

would produce the output file

1|2|3|4|5

-- 
You are receiving this mail because:
You are the QA Contact for the bug.

Received on Friday, 21 November 2014 10:38:19 UTC