xsl-list
[Top] [All Lists]

Re: [xsl] Ambiguous rule match for

2007-04-18 23:19:30
I sometimes solve this problem by setting priority to the template.

<xsl:template match="text:p[(_at_)text:style-name='p_5f_pre']" priority="10">

Setting an arbitrary high priority will make sure, that this template
rule will be selected.

On 4/19/07, Michael B Allen <mba2000(_at_)ioplex(_dot_)com> wrote:
Hello,

I have an 'ambiguous rule' problem that I'm not sure how to fix.

I have two templates matching rules. One that is fairly elaborate
(what it does is not important):

<xsl:template match="text:p[(_at_)text:style-name='p_5f_pre' and 
not(preceding-sibling::*[1][(_at_)text:style-name='p_5f_pre'])]">

and one that is very simple:

<xsl:template match="text:p">

The problem is that both of these templates match the input so it get's
duped in the output.

If I try to add a third template that outputs nothing like:

<xsl:template match="text:p[(_at_)text:style-name='p_5f_pre']">

I get 'Ambiguous rule match for' errors.

This seems like an impossible situation. Any ideas as to how I can
dodge this?

I'm using Saxon 8.

Mike

--
Michael B Allen
PHP Active Directory Kerberos SSO
http://www.ioplex.com/


--
Regards,
Mukul Gandhi

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