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] Retrieving "included" from "excluded"


Subject: Re: [xsl] Retrieving "included" from "excluded"
From: Jeni Tennison <jeni@xxxxxxxxxxxxxxxx>
Date: Mon, 24 Jun 2002 15:56:51 +0100

Hi Alex,

> and I only want to display "Foobar" (using fo, when matching
> excludedFields). How could I do that ?

Try selecting the fields that you want:

  Fields/field

and then filtering them to include only the ones whose names are *not*
listed within the ExcludedFields:

  Fields/field[not(@name = ../../ExcludedFields/field/@name)]

Since the list of excluded field names is always going to be the same,
it's best to store that in a variable if you can:

  <xsl:variable name="excludedFields"
                select="ExcludedFields/field/@name" />
  <xsl:value-of
    select="Fields/field[not(@name = $excludedFields)]/@name" />

Cheers,

Jeni

---
Jeni Tennison
http://www.jenitennison.com/


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



Current Thread
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