Subject: Re: [xsl] Parameter problem From: Mike Brown <mike@xxxxxxxx> Date: Wed, 13 Mar 2002 12:59:55 -0700 (MST) |
Hellstern, Manny wrote: > For simplification, I'm now trying this: > > <INTROMSG> > Please click on the <img id="imgAlert" > src="http://aaa/images/pic.gif" /> in order to continue. > </INTROMSG> > > and in XSL I'm doing this: > > <p id="pInstructions"><xsl:value-of select="//INTROMSG"></p> > > but my result is still: > > Please click on the in order to continue. > > however, if I change my XSL to: > > <p id="pInstructions">Please click on the <img id="imgAlert" > src="http://aaa/images/pic.gif" /> in order to continue.</p> > > it works. > > What am I missing? Use xsl:copy-of instead of xsl:value-of. xsl:value-of means: Create a text node in the result tree. The text in it should be what XPath calls the "string-value" of the object identified by the XPath expression in the xsl:value-of's "select" attribute. //INTROMSG identifies a node-set object consisting of every INTROMSG element in the document (and perhaps you want to change this to something more specific). The string-value of a node-set is the string-value of the first node in that set. The string-value of a node is the concatenation of all its descendant text nodes; nothing else. The 'img' element child of the 'INTROMSG' is not text; it's an empty element. xsl:copy-of is usually only used with XPath expressions identifying node-sets, and it means: Create in the result tree an identical copy of the identified nodes and their descendants. - Mike ____________________________________________________________________________ mike j. brown | xml/xslt: http://skew.org/xml/ denver/boulder, colorado, usa | personal: http://hyperreal.org/~mike/ XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] Parameter problem, Hellstern, Manny | Thread | RE: [xsl] Parameter problem, Dion Houston |
RE: [xsl] Parameter problem, David N Bertoni/Camb | Date | RE: [xsl] Parameter problem, Hellstern, Manny |
Month |