Subject: Re: [xsl] xsl:sequence From: David Carlisle <davidc@xxxxxxxxx> Date: Thu, 10 Aug 2006 17:10:37 +0100 |
> is pretty bad practice sometimes you start to use it but then (as I posted earlier) find you have <br/> or <img/. or something where you want to do something smarter so need to change to use apply-templates. I'm not sure if that makes it bad practice. The concept of the "string value" of an element being the concatenation of its character data runs throughout xslt, including places where the apply-templates option isn't avaliable, for example if you go <xsl:sort select="an/element"/> then this string value of the element is used as the sort key, similarly if you go /an/element[.='foo'] it is this string value that is compared with 'foo'. Trying to program in XSLT without ever using the string value of an element would be hard I think, and xsl:value-of is just defined to return a text node with the string value of the selected node (or nodes in XSLT2). > Or does the 'without doing a lot of work that the system has already done' > argument still hold? whether the system is already holding the string value, or whether it has to recursively calculate it when requested is of course an implementation detail that will depend on the implementation. I'll leave implementation details to those on the list who've implemented it, I don't want Michael to call me naive twice in one thread:-( David
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] xsl:sequence, tom tom | Thread | RE: [xsl] xsl:sequence, Michael Kay |
Re: [xsl] Passing xml nodes to a fu, David Carlisle | Date | Re: [xsl] Recursive call trouble, Luke Jones |
Month |