Subject: Re: [xsl] Is this possible in XSLT From: Joerg Pietschmann <joerg.pietschmann@xxxxxx> Date: Thu, 30 Aug 2001 18:10:36 +0200 |
"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 |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] Is this possible in XSLT, Nicholas Waltham | Thread | [xsl] returning distinct results, Tim |
RE: [xsl] Replacing all Occurences , Chris Bayes | Date | RE: [xsl] How do I get MSXML to STO, Mulberry Technologie |
Month |