[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Parameter problem
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
|
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
|