xml editor

Supported platforms

Compatible with Windows7 & Mac OS X Snow Leopard

Ready for data server software
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

RE: [xsl] Selecting nodes based on previous node values


Subject: RE: [xsl] Selecting nodes based on previous node values
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Thu, 11 Dec 2008 09:25:17 -0000

> Assume the following XML snippet.
> 
> <demo>
>     <library>
>         <criteria><status  value="active"/></criteria>
>         <books><book title="test"/></books>
>     </library>
>     <library>
>         <criteria><status  value="notActive"/></criteria>
>         <books><book title="this may not be visible"/></books>
>     </library>
> </demo>
> 
> I want to print all book titles in library with criteria 
> status = "active".

Try:

select="demo/library[criteria/@value='active']/books/book

Michael Kay
http://www.saxonica.com/


Current Thread
Keywords
xml
XML Editor | XML Author | WYSIWYG Editors | Schema Editor | XSD Documentation | XSL/XSLT Editor | XQuery | XML Databases | SVN Client
© 2002-2011 SyncRO Soft Ltd. All rights reserved. | Sitemap | Privacy Policy | This website was created & generated with <oXygen/>®XML Editor