[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Saxon Error: Conditional Transformation Matches BOTH

Subject: Saxon Error: Conditional Transformation Matches BOTH of "Either/Or" Template
From: Raymond Lillibridge <RLillibridge@xxxxxxxxxxxx>
Date: Wed, 5 Jun 2013 18:58:22 +0000
 Saxon Error:  Conditional Transformation Matches BOTH
Group,

I'm hoping that you might be able to help me narrow down a solution
for an XSLT transformation I'm having difficulty with.  My XML data has many
<para.../> elements.  

My Goal:
To have a single template that matches an
element under either of two conditions:
(a) the element does not have a given
attribute ("not(@selectout)" for instance)
(b) the element has the given
attribute that contains a given value("...contains(@selectout, 'html'") for
instance)

Here are some abbreviated samples to help clarify my input.
...
<para id="para_1" selectout="none" block_type="block" gclevel="0">
This line
should not be output to any of our products.
</para>

<para id="para_2"
selectout="ebook html" block_type="block" gclevel="0">
This line should be
output to EBOOK &amp; HTML products.
</para>

<para id="para_3"
selectout="print" block_type="block" gclevel="0">
This line should be output
to PRINT ONLY products.
</para>

<para id="para_4" gclevel="0"
justify="center" block_type="block">
This line should be output for all
products since the &amp;selectout attribute does not exist.
</para> 
...
Here is a copy of the match portion of my test template (XSLT 2.0):
<xsl:template match="para[not(@selectout)]  |  para[contains(@selectout,
'html')]">
...
</template>


Using Saxon for my transformations:  
Saxon-EE
9.3.0.4J from Saxonica
Java version 1.7.0_21


Saxon error message:
Recoverable error
  XTRE0540: Ambiguous rule match for /level1/para[44]
Matches both "para[not(@selectout)] | para[contains(@selectout, 'html')]"

I'm
at a loss as to how the template matches both conditions at the same time.
Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.