[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Parameter problem

Subject: Re: Parameter problem
From: Mike Brown <mike@xxxxxxxx>
Date: Wed, 13 Mar 2002 12:59:55 -0700 (MST)
manny dion images
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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.