xsl-list
[Top] [All Lists]

Re: XSL with multiple levels

2002-10-10 13:58:57
Not the most sensible XML, but you knew that.

yes, I know, but our professor wanted it written that way..

If you can say what test you can subject a component/*/*/* element to that
makes it clear whether to use that element itself or its child elements, it
shouldn't be too difficult. Perhaps the presence of the 'manufacturer'
attribute can be the test. Take the union of the ones that have a manufacturer
and the ones that are children of those that don't.

component/*/*/*[(_at_)manufacturer] | component/*/*/*[not(@manufacturer)]/*

or perhaps more simply

component/*/*/descendant::*[(_at_)manufacturer]

Thanks for the reply Mike, it worked like a charm!

Adam




_________________________________________________________________
Chat with friends online, try MSN Messenger: http://messenger.msn.com


XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list



<Prev in Thread] Current Thread [Next in Thread>