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

Re: XSL and processing

Subject: Re: XSL and processing
From: James Clark <jjc@xxxxxxxxxx>
Date: Thu, 03 Sep 1998 14:22:21 +0700
nodeidentifier xml
Tomas Eriksson wrote:
> 
> Hello,
> 
> I have a question regarding processing in XSL. I have the following document,
> 
> <root>
>    <pool>
>        <doc identifier="node6">
>            <title>The node title</title>
>        </doc>
>        <doc identifier="node14">
>            <title>The node title</title>
>        </doc>
>    </pool>
>    <relations>
>        <rel>
>             <ref nodeidentifier="node6"/>
>        <rel>
>        <rel>
>             <ref nodeidentifier="node14"/>
>        <rel>
>    </relations>
> </root>
> 
> I would like to process the relations - rel section as a tree (image) and
> after the tree node display the title of the references doc node. I have
> tried the following,
> 
> <xsl:template match="root">
>     <xsl:for-each select="relations/rel/ref">
>         <IMG src="plus.bmp" style="cursor: hand;" align="top"></IMG>
>         <SPAN>
>         <xsl:process
> select="ancestor(root)/pool/doc[attribute(identifier)='{attribute(nodeidenti
> fier)}']/title"/>
>         </SPAN>
>     </xsl:for-each>
> </xsl:template>
> 
> <xsl:template match="root/doc/title">
>         <xsl:process-children/>
> </xsl:template>
> 
>  I am only interested in the doc[identifier]/title matching the ref -
> nodeidentifier value.
> 
> It seems like I am loosing the value of {attribute(nodeidentifier)} when I
> go into a new xsl:process instruction

That won't work because the select attribute of xsl:process isn't
treated as an attribute value template.  In the future you might be able
to do it using something like:

ancestor(root)
 / pool
 / doc[attribute(identifier) = ./attribute(nodeidentifier)]

> Does anyone know how to process and match attribute values the way I want
> to do ? Is it possible with XSL ?

Not yet.

James



 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.