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

Re: Filtering problem

Subject: Re: Filtering problem
From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx>
Date: Wed, 28 Jun 2006 10:58:57 -0400
Re:  Filtering problem
Marcus,

Mukul is correct to point you to the identity transform to build your filter.

In particular, your problem is just a bit trickier than the ordinary case since your requirements include things like

there are no attributes starting dim1
or
dim1_a="yes"

Unfortunately, the proposed match="*[starts-with(name(@*), 'dim1')] won't work, since when there are several attributes it will only examine the name of the first of them, in document order, which as it happens is undefined.


You may need something like

match="*[not(@*[starts-with(name(),'dim1')]) or @dim1_a='yes']"

... as you can see, the XPath is pretty fancy. Basically it's matching any element node for which the set of attributes whose name starts with 'dim1' is empty, or for which @dim1_a='yes'.

More information about filters using the identity transform is available on line (use your search engine) or the FAQ.

Cheers,
Wendell

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.