Subject: Re: [xsl] Looking for a concise way of specifying an conditional attribute in output From: Brandon Ibach <brandon.ibach@xxxxxxxxxxxxxxxxxxx> Date: Fri, 6 May 2011 05:25:00 -0400 |
On Fri, May 6, 2011 at 4:51 AM, David Carlisle <davidc@xxxxxxxxx> wrote: > On 06/05/2011 07:40, Dave Pawson wrote: >> How about renaming it to 'xsl:string-value-of' which might be >> more accurate? Lot more typing though > > But that would make it sound even more like it creates a string, which it > doesn't, it creates a text node (and even if it were a better name, Good point, David. I chose my words poorly when I said "the result will be a string", since the result of xsl:value-of is always a text node, which is all the more reason why I think xsl:text should be given the features currently possessed by xsl:value-of so it can take its place as the preferred means of creating dynamic text nodes (by which I mean text nodes whose content is determined at run-time) as well as the static text nodes it is already capable of. > it is rarely the case that when there is confusion between two names, adding > a third name helps). Indeed. The more I've thought about it, the more I've wondered why there was ever a need for xsl:value-of, rather than just having xsl:text be the way to create text nodes, static or dynamic. On the static vs. dynamic note, since I'm in the "wouldn't it be nice" mode, I'd also be interested to see XSLT expand the range of places where attribute value template syntax can be used, as I find it to be a particularly nice, concise syntax for combining static and dynamic pieces. Perhaps allow a "value" attribute anywhere you can currently use "select", with the value interpreted as an AVT? -Brandon :)
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Looking for a concise way, David Carlisle | Thread | Re: [xsl] Looking for a concise way, Michael Kay |
[xsl] block selection question (XSL, Hermann Stamm-Wilbra | Date | Re: [xsl] block selection question , Mukul Gandhi |
Month |