[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] 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.
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|