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

Re: Is this possible in XSLT

Subject: Re: Is this possible in XSLT
From: Joerg Pietschmann <joerg.pietschmann@xxxxxx>
Date: Thu, 30 Aug 2001 18:10:36 +0200
what is possible with xslt
"Nicholas Waltham" <info@xxxxxxxxxxxx> wrote:
> I would like to be able to check a series items in a list against items in
> another. Selecting the parent item of the second list if it contains all the
> items in the list (but it may contain more) for example

If you want to check whether all the elements in a node set $list1
have similar companions in another node set $list2 you can try
something like this

  <xsl:if test="$list/item[not($list2/item/@id=@id)]">
    <xsl:message>Check failed</xsl:message>
  </xsl:if>
 
If position is relevant too, or element names are variable, or
the structure if the elements may be more complicated, it gets
more difficult.

> I immagine being able to create a dom xml fragment containing the first list
> to be able to do this - I don't know if this really a good idea or not.
If you mean you'll resort to a script embedded in the style sheet:
This depends on what you exactly mean by "check against". Some, but
not all problems are easier solved in a script.

HTH
J.Pietschmann

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


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.