This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: How to specify a path to a node in a nodeset using a variable


> I have the following scenario
>
> INPUT.XML
> <document>
>   <group>
>      <row>
>         <label>User Id:</label>
>         <entryfield name="/Person/UserId/@name"/>   <!--

>   <xsl:variable name="path" select="string(@name)"/>
>         <xsl:value-of select="$container/$path"/>

Inventive, but it doesn't work. Variables can only hold values, they can't
hold expressions or parts of expressions.

Saxon (and I think several other products, now) has an evaluate() extension
function that will do this for you.

Mike Kay
Software AG


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]