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]

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

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