|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Expressions in attributes
I am trying to embed XML values into an HTML string within my XSL stylesheet
using the '{}' notation.
The example below is based on one found in an XSL text book ('The XSL
Companion'), however the values (highlighted in
the XSL file in blue) never appear to be interpreted.
Please could someone tell me why this is or suggest another way of doing
this? I'm using the latest MSXML parser supplied
by Microsoft (msxml3.dll) on IE5.
Example XSL file (form2.xsl) :-
<xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl">
<xsl:template match="/">
<xsl:apply-templates select="//image"/>
</xsl:template>
<xsl:template match="image">
<!-- Position the image -->
<IMG SRC="{name}" HEIGHT="{y}" WIDTH="{x}" />
</xsl:template>
</xsl:stylesheet>
Example XML source document :-
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="form2.xsl" ?>
<!-- Form.xml, contains form details -->
<image>
<name>C:\Program Files\Microsoft Visual
Studio\MSDN\2000OCT\1033\SAMPLES\VB98\Palmode\banner.gif</name>
<y>200mm</y>
<x>190mm</x>
</image>
Many thanks,
Rob Whitfield
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








