Re:

Subject: Re:
From: Phil Lanch <phil@xxxxxxxxxxxxxxx>
Date: Thu, 11 Nov 1999 15:00:41 +0000
David Hemmingsson wrote:
> 
> Hi!
> I need to do something like this:
> XML:
> 
> <?xml version = "1.0" ?>
> <doc>
>         <title>The title</title>
> </doc>
> 
> XSL:
> 
> <xsl:stylesheet...>
>         <xsl:template match="/">
>         .
>         .
>         <card id="First Card" title="[HERE I NEED THE CONTENT OF THE
> <title>-TAG!]">

Try putting:

<card id="First Card" title="{doc/title}">

The {} enclose an attribute value template
- that means that contents of the {} are interpreted as an expression
- see [7.6.2].

>                 Some text
>         </card>
>         .
>         .
>         </xsl:template>
> </xsl:stylesheet>
> -----------------------------
> I'm quite sure that there is a simple solution, ...

Yup.

-- 

cheers

phil


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


Current Thread