[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
RE: [xsl] Parameter problem
Subject: RE: [xsl] Parameter problem From: "Michael Kay" <michael.h.kay@xxxxxxxxxxxx> Date: Wed, 13 Mar 2002 18:06:49 -0000 |
> I'm having trouble with my XSL style sheet. Here is what I am doing: > > I have an XML file with the following: > > <INTROMSG> > Please click on the <img id="imgAlert" > src="{$urlNextTabImg}" /> in order to continue. > </INTROMSG> Putting attribute value templates, or any other kind of XPath expression, in your source document will do you no good at all: they belong in the stylesheet. What I would do would be to put <intromsg/> in the source document, and <xsl:template match="intromsg"> <p id="pInstructions">Please click on the <img id="imgAlert" src="{$urlNextTabImg}" /> in order to continue.</p> </xsl:template> in the stylesheet. > > And then within my style sheet I have: > <p id="pInstructions"><xsl:value-of select="//*/INTROMSG" > disable-output-escaping="yes" /></p> > Using disable-output-escaping="yes" almost invariably means that you haven't understood what XSLT is for. Unless you're an expert, of course, in which case you will use it very occasionally when you need to generate non-standard output formats. And "//*/INTROMSG" is a pretty strange (and inefficient!) path expression to use here! Michael Kay Software AG home: Michael.H.Kay@xxxxxxxxxxxx work: Michael.Kay@xxxxxxxxxxxxxx XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] Parameter problem, Hellstern, Manny | Thread | RE: [xsl] Parameter problem, Hellstern, Manny |
AW: [xsl] Newbie question: conditio, Fries, Markus, fiscu | Date | RE: [xsl] Command Line XSLT program, Michael Kay |
Month |