RE: [xsl] why is it worked out?

Subject: RE: [xsl] why is it worked out?
From: "Michael Kay" <michael.h.kay@xxxxxxxxxxxx>
Date: Wed, 24 Apr 2002 08:44:38 +0100
> it took me some time before i got tired and made a mistake putting
> XPath(is it how it is called?) inside a predicate of a XPath
> like below:
> <xsl:if test="not(following-sibling::item[not(@db-end) and
> not(@db-start) or
>                   following-sibling::item]
>                   )">
> what i actually ment was
>
> <xsl:if test="not(following-sibling::item[not(@db-end) and
> not(@db-start)]
> or
>                   following-sibling::item
>                   )">
> surprisingly enough to me it worked allright.
> could someone please explane what is going on inside of test=""?

The first expression is true if there is no following sibling item that
either has no @db-end or @db-start attribute, or that has a following
sibling item.

The second expression (the one you said you meant) is rather strange. It
reduces to

   not(FS[condition] or FS)

which is equivalent to

   not(FS)

so it is true if there is no following-sibling item.

Michael Kay
Software AG
home: Michael.H.Kay@xxxxxxxxxxxx
work: Michael.Kay@xxxxxxxxxxxxxx


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


Current Thread