|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Exclusions in XPATH
> Question 1: Can I get both attribute-names and element-names more easily in > the select or does it have to be like I have it above ? it's hard to answer that without knowing what your criterion for selection was intended to be. the select expression you had was select="./*[1]//*[not(*)]|./*[1]//@*[not(*)]"> a leading ./ never does anything, and attributes never have element children so that can be simplified to select="*[1]//*[not(*)]|*[1]//@*"> which selects all the attributes and leaf elements of descendents of the first child of the current node. In your posted example the *[1] isn't doing anything as there is only one child of A, so if that is always the case, or if you want all descendents of A not just of the first child, it can be further simplified to select=".//*[not(*)]|.//@*"> > How can I exclude the descendants of element F select="*[1]//*[not(*) and not ancestor::F]|*[1]//*[not(ancestor::F)]/@*"> David _____________________________________________________________________ This message has been checked for all known viruses by Star Internet delivered through the MessageLabs Virus Scanning Service. For further information visit http://www.star.net.uk/stats.asp or alternatively call Star Internet for details on the Virus Scanning Service. XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
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
|

Cart








