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

RE: passing_cousin_content_as_counter

Subject: RE: passing_cousin_content_as_counter
From: "Michael Kay" <mhk@xxxxxxxxx>
Date: Sun, 1 Aug 2004 23:02:02 +0100
RE:  passing_cousin_content_as_counter
> and while it seems pretty logical to just select the relevant
> COORDINATES_ITEM elements
> and add a d character in front of their number content, it doesn't.It
> produces an identical
> xml doc with the source one.It looks like, it ignores the 
> second template
> and just applies
> the first identity template, producing exactly the same document.

It's a shame that having got that far, you weren't able to find the simple
error in my code. The predicate should be

<xsl:template match="COORDINATES_ITEM[position() =
    /SHAPE/ELEM_INFO/ELEM_INFO_ITEM[position() mod 3 = 1]]">

This now works in Saxon 6.5.3. Unfortunately it shows up an optimization bug
in Saxon 8.0, which is related to
https://sourceforge.net/tracker/index.php?func=detail&aid=998978&group_id=29
872&atid=397617 but not identical to it. Although this predicate does not
use variables explicitly, it is optimized to the XQuery expression

let $temp := /SHAPE/ELEM_INFO/ELEM_INFO_ITEM[position() mod 3 = 1]
return COORDINATES_ITEM[position() = $temp]

and this is hitting problems in allocating stack space for variables in
patterns.

Michael Kay

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.