Subject: Expressions in attributes From: Rob Whitfield <RobW@xxxxxxxxxxxxxx> Date: Tue, 10 Oct 2000 16:55:44 +0100 |
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
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Generation of HTML & WML on the fly, Jaiswal, Vinay (CTS) | Thread | RE: Expressions in attributes, Heather Lindsay |
Generation of HTML & WML on the fly, Jaiswal, Vinay (CTS) | Date | restrict elements for call-template, Jerome Thebert |
Month |