xsl-list
[Top] [All Lists]

Re: [xsl] Saxon Error: Conditional Transformation Matches BOTH of "Either/Or" Template

2013-06-06 07:16:09
First, "Thanks" again for your kind input.

np

Using:  match="para[not(@selectout) or contains(@selectout, 'html')]" does 
not work because the "contains(@selectout, 'html')" clause returns a boolean 
and not a node().


That doesn't really make sense... all predicates evaluate to a true/false.

Creating two templates simplified everything and now all is well:

<xsl:template match="para[@selectout]">
    <xsl:if test="contains(@selectout, 'html')">
        ...
    </xsl:if>

    <xsl:if test="not(contains(@selectout, 'html'))">
        <!-- do nothing -->
    </xsl:if>
</xsl:template>


<xsl:template match="para[not(@selectout)]">
    ...
</xsl:template>

Ah ok, did you originally have:

 match="para[@selectout]"

and

 match="para[not(@selectout)] | para[contains(@selectout, 'html')]"

...in which case you can see where the match conflict would come from.

-- 
Andrew Welch
http://andrewjwelch.com

--~------------------------------------------------------------------
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>
--~--