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

Re: Matching attribute with condition in predicate

Subject: Re: Matching attribute with condition in predicate
From: Михаил Сабуренков <jack.vosmerkin@xxxxxxxxx>
Date: Tue, 22 Dec 2009 18:13:19 +0300
Re:  Matching attribute with condition in predicate
2009/12/22 G. Ken Holman <gkholman@xxxxxxxxxxxxxxxxxxxx>:
>
> Because the "/" at the start of "/root/@condition" is the top of the
> _current tree_, not the top of the initial tree. B Thus it is at the top of
> the tree with the attribute because it is in the predicate tested when the
> attribute is the current node.
>
> You want a global variable something like:
> B <xsl:variable name="orig" select="/"/>
>
> ... and then in your predicate @attr[$orig/root/@condition='ru'] in order
to
> switch to the original tree from your temporary tree.

Thanks for quick reply.
Now I see why it's not working, but I can't use variables in
template/@match, can I ?
So I can't figure out how to get original tree there, and it seems
that I have to use choose/when/otherwise.

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.