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: Re: Re: RE: Re: RE: Re: XPath riddle


Hi Dimitre,

At 05:24 PM 7/5/01, you wrote:
>Yes, this only will not work in the more general case when the ancestor 
>element
>names to check for are generated "on the fly" from a schema.
>
>Then only the second expression I gave will work:
>
>//D/C[name(ancestor::*[contains($listOfDefiningEls, concat(' ', 
>name()))][1])='A']

Acknowledged. To be generated from the schema, the "cleaner" XPaths would 
have to be done in two passes (one to generate, one to apply them), whereas 
yours could be done in one.

>Also note, that an optimizing XPath processor will stop at the first 
>occurence of
>the above expression, while if last() is used, it will have to produce all the
>nodes.

Again, something it is often worth keeping in mind (though lists of 
ancestors usually won't be *so* long...).

Thanks,
Wendell


======================================================================
Wendell Piez                            mailto:wapiez@mulberrytech.com
Mulberry Technologies, Inc.                http://www.mulberrytech.com
17 West Jefferson Street                    Direct Phone: 301/315-9635
Suite 207                                          Phone: 301/315-9631
Rockville, MD  20850                                 Fax: 301/315-8285
----------------------------------------------------------------------
   Mulberry Technologies: A Consultancy Specializing in SGML and XML
======================================================================


 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]