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

RE: Problem turning a xml string into a proper tree

Subject: RE: Problem turning a xml string into a proper tree
From: "Michael Kay" <mhk@xxxxxxxxx>
Date: Tue, 3 Feb 2004 15:48:09 -0000
RE:  Problem turning a xml string into a proper tree
> I have a template that  receives a parameter  that way:
>     <xsl:with-param name="paramString">
>         <params>
>             <param att="att1" name="name11">value1</param>
>             <param att="att2" name="name12">value2</param>
>                 .........
>           </params>
>     </xsl:with-param>
> What I'd like to is  to retrieve the value of  <xsl:value-of 
> select="$paramString/param[n]/@name" /> 

To do that in XSLT 1.0 you need the node-set() extension:


> What it more if i make <xsl:value-of select="$paramString"/>  
>  it should 
> return value1value2 but it returns        
>         <params>
>             <param att="att1" name="name11">value1</param>
>             <param att="att2" name="name12">value2</param>
>                 .........
>           </params>
> this means xalan treats it as a string instead of a tree as 
> I'd like to.

<xsl:value-of select="$paramString"/>

should indeed return the string "value1value2". I'm very surprised if it
returns a string containing angle brackets. You need to show us a
complete stylesheet that demonstrates the problem.

Michael Kay

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

Current Thread


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.
First Name
Last Name
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.