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

Problem in using "ancestor()" func. in qualifier list of XSL

Subject: Problem in using "ancestor()" func. in qualifier list of XSL query
From: "Amit Rekhi" <amitr@xxxxxxxxxxxxx>
Date: Tue, 25 Jan 2000 18:17:06 +0530
using ancestor in xsl

This ques. pertains to Decemeber 18 working draft of XSL


I am trying to include a function call from within the qualifier list of an
query but I am not getting the desired result.
Let me explain with an eg.
Let's say I have a the following XML fragment:
<ElementDecl Name = "ELE1">
       <Ref Element = "ELE2">
           <Ref Element = "ELE3">
<AttDef Element = "ELE1" Name = "Type" AttValue = "TSet" />

For the above XML fragment, I have a template rule for "<Seq>".

Now, in this "<Seq>" template rule, I want to check whether the ancestor
"<ElementDecl>" element's "Name" attribute will match an "<AttDef>"
"Element" attribute. I want to achieve all this in one XSL query. i.e.
<xsl:when test = "AttDef[@Name = 'Type' and @AttValue = 'TSet' and
@Element = ancestor(ElementDecl[@Name])] " />

But this query does not work!

- How to make the above query work so that I can test the equality of
"<ElementDecl>" element's "@Name" attribute with "<AttDef>" element's
attribute in a single query?

- Is it possible to use the ancestor() XSL function within the qualifier
list of an
XSL query? If so, how?

Thanks in advance for any replies,

Amit Rekhi,
Software Engineer,
A.B. Infosys Private Limited,
B-102, Gulmohar Park,
New Delhi - 110049,
Tel: +91-11-6512816,6512822,6968976
Fax: +91-11-6518873
Website: http://www.abinfosys.com
EMail: amit@xxxxxxxxxxxxx

Note: Not related to Infosys Technologies Limited

 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.