xsl-list
[Top] [All Lists]

RE: [xsl] Set difference in xsl:number/@count, xsl:key/@match

2007-03-21 16:25:28
<xsl:number count="*[my:is-class-figure(.)]"/>
where the function my:class-figure is defined in the base stylesheet as
<xsl:function name="my:is-class-figure">
  <xsl:param name="node" as="element()"/>
  <xsl:sequence select="contains($node/@class, ' figure ')"/>
</xsl:function>
and is redefined in your customization layer as:
<xsl:function name="my:is-class-figure">
  <xsl:param name="node" as="element()"/>
  <xsl:sequence select="contains($node/@class, ' figure ') and
not(contains(@class, ' flowchart '))"/>
</xsl:function>

Thanks, that's just the kind of trapdoor to escape from pattern to XSLT
that I would never have thought of.  I'll need a mild tweak to it to deal
with the fact that there might be a conflict between two or more
customization layers since each can define its own is-class-figure(), but
that's just a Simple Matter of Programming.

I'll suggest it to the toolkit team when it drops support for XSLT 1.0.



--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>