xsl-list
[Top] [All Lists]

Re: [xsl] Text value templates in XSLT 3?

2012-11-05 13:35:02
"Imsieke, Gerrit, le-tex" wrote:

  Hi,

Thomas Meinike has pointed [1] me to your XMLSS presentation on the
XPath/XSLT/XQuery 3.0 novelties. Among other things, you presented
XSLT text value templates [2], a feature that we didn’t see in the
current draft spec [3].

  Oops, good point, I didn't check the current draft and thought it
was already part of it; I was wrong.

I think that it’s misleading because syntactically it looks like
XQuery where an arbitrary sequence may be created by the expression
inside the curly braces, while in XSLT the expression should
evaluate to a mere text node.

  I am not sure why you think it should be only for generating text.
Actually an interesting use case I've discussed with Eric van der
Vlist, if the result of the expression is added to the output tree
(and not its atomized text value), is to indent properly complex XPath
expressions.

  Thanks to the power of XPath 2.0 (and this is going to be even more
true with XPath 3.0), the XPath expressions used in xsl:sequence are
more and more complex, and need more and more to be properly indented
and edited.  Which does not always fit properly being the value of an
attribute (especially if the attribute goes true an XML parser at some
point, loosing newline characters).  Using curly braces will then be
an easy way to solve that problem (a la XQuery).

  Regards,

-- 
Florent Georges
http://fgeorges.org/
http://h2oconsulting.be/

[1] https://twitter.com/XMLArbyter/status/263220416817025024
[2] http://fgeorges.org/papers/fgeorges-xmlss-xslt-trends.pdf#page=40
[3] http://www.w3.org/TR/xslt-30/

--~------------------------------------------------------------------
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>
--~--