xsl-list
[Top] [All Lists]

RE: [xsl] no output files

2008-11-19 10:19:23
The fact that in this case a file (empty) is still created 
seems like a bug. 

It is actually a deliberate design choice, after a reasoned debate.

Given that an XSLT stylesheet can be used to create an external general
parsed entity, and that an external general parsed entity can legitimately
be "empty", we felt that

<xsl:param name="n" as="xs:integer"/>
<xsl:template match="/">
  <xsl:for-each select="1 to $n">
    <xsl:text>baa</xsl:text>
  </xsl:for-each>
</xsl:template>

should produce an EGPE whose value contains $n repetitions of the string
'baa', in all cases including when $n=0.

It's also relevant for example if the output of the stylesheet is a list of
data errors found in the source document. If there are no such data errors,
the next stage in the processing pipeline should expect to see an empty
list. It's quite possible in this case that the result will be passed to the
next stage as an XDM tree, without being serialized.

Michael Kay
http://www.saxonica.com/


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>