Subject: Re: XSL : template for attribute
From: James Clark <jjc@xxxxxxxxxx>
Date: Fri, 30 Apr 1999 12:03:19 +0700
|
Kay Michael wrote:
> (Incidentally, I can't see an easy way in the April 99 spec to test in a
> boolean expression whether the current node matches a match-pattern. I would
> have thought it would be useful to allow something like:
>
> <xsl:if test="matches(CHAPTER[TITLE]//PARA)">
>
> to test whether the node is a PARA with a CHAPTER ancestor that has a TITLE
> child.
Expressions are powerful enough that this isn't necessary:
<xsl:if test="from-self(PARA) and
from-ancestors(CHAPTER[TITLE])">...</xsl:if>
> In SAXON I made the test a match pattern because a match pattern can refer
> to a select pattern but not the other way round.);
Right, but it means you have to wrap things with ".[" and "]" a lot.
James
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|