This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Inserting URL info from XML element into XSL template




]Two options:
]
]1. Use a variable and an attribute value template:
]<xsl:variable name="filename" select="img/text()"/>
]<img scr="images/{$filename}" />
]
]2. Use xsl:attribute with xsl:value-of:
]<img>
]    <xsl:attribute name="src">images/<xsl:value-of
]select="img"/></xsl:attribute>
]</img>

or simpler 

3) use the attribute value template directly 
<img scr="images/{img}" />

David

_____________________________________________________________________
This message has been checked for all known viruses by Star Internet
delivered through the MessageLabs Virus Scanning Service. For further
information visit http://www.star.net.uk/stats.asp or alternatively call
Star Internet for details on the Virus Scanning Service.

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]