This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: why is it worked out?


> 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@ntlworld.com
work: Michael.Kay@softwareag.com


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]