[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: XSLT feature request - element value templates!

Subject: Re: XSLT feature request - element value templates!
From: Eric van der Vlist <vdv@xxxxxxxxxxxx>
Date: Wed, 28 Jun 2000 17:44:41 +0200
xslt href element
Warren,

Warren Hedley wrote:
> 
> I'm a big advocate of XSLT, but I must admit there are a few things in
> it which really annoy me. One feature which I would like to see, and
> something which I think might make a lot of people's lives easier, is
> the addition of "element-value-templates", the equivalent of the current
> "attribute-value-template". Consider the following XSLT fragment, which
> demonstrates the problem.
> 
>   <a href="{$OUTPUT_DIRECTORY}/{base_filename}.html">
>     <xsl:value-of select="$OUTPUT_DIRECTORY" />
>     <xsl:text>/</xsl:text>
>     <xsl:value-of select="base_filename" />
>     <xsl:text>.html</xsl:text>
>   </a>

What can also write :

<xsl:value-of select="concat($OUTPUT_DIRECTORY, '/', base_filename,
'.html'"/>

It may be considered as less simple (although it's quite subjective) but
it has the big advantage to exist ;=) ...

Eric

> The content of the href attribute and the <a> element are identical, yet
> the construction of the first is beautifully simple, yet the second is
> simply painful.
> 
> I must confess I haven't devoted a lot of time (< 5 minutes, to be exact)
> thinking about the best way of solving this problem, but here's one fix.
> 
>   <a href="{$OUTPUT_DIRECTORY}/{base_filename}.html">
>     <xsl:text template="{$OUTPUT_DIRECTORY}/{base_filename}.html" />
>   </a>
> 
> Perhaps a special element is needed <xsl:element-content template="" />
> to make it easier to force the content to be empty.
> 
> If this "element-value-template" functionality existed, you might never
> see <xsl:value-of ... /> again!
> 
> It seems to be that this wouldn't be very hard to implement as an extension
> element or attribute in existing processors - all of the relevant technology
> is already there. Possibly someone has, and I haven't seen it yet.
> 
> The only question remaining is: is there demand for this?
> 
> What say the XSL-LIST.
> 
> --
> Warren Hedley
> Department of Engineering Science
> Auckland University
> New Zealand
> 
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

-- 
------------------------------------------------------------------------
Eric van der Vlist       Dyomedea                    http://dyomedea.com
http://xmlfr.org         http://4xt.org              http://ducotede.com
------------------------------------------------------------------------


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.