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

RE: postion gives me 2 instead of 1

Subject: RE: postion gives me 2 instead of 1
From: "Lars Huttar" <lars_huttar@xxxxxxx>
Date: Fri, 20 Jun 2003 11:14:39 -0500
RE:  postion gives me 2 instead of 1
Paul Tremblay wrote:
> Okay, I've found the culprit. If I use *just* the above fragment in my
> xslt stylesheet, then it works. However, if I add this:
> 
> 
> 
>     <xsl:template match = "listitem/para">
> 	<block left-indent = "3">
>              <xsl:apply-templates/>
>         </block>
>     </xsl:template>
> 
> Thenn it does not work. The processor applies the second template with
> no predicate. 
> 
> I don't understand why this is so. I thought the templates that were
> most specific got applied before the ones that were more general?

Yes, but the granularity's not quite that fine.
Templates with "typical" match patterns like  match="para"
have default priority 0.
Templates with "more specific" match patterns,
like those with multiple steps ("listitem/para") and/or predicates
("listitem/para[1]"), have default priority 0.5.

If you assign your templates explicit priorities, "you may find
that stylesheets are easier to understand and less error-prone".
[Kay p. 316]

Lars


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


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.