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

AW: Apply-Templates

Subject: AW: Apply-Templates
From: Elmar.Hurni@xxxxxx
Date: Tue, 13 May 2003 08:38:41 +0200
elmar.aw
Hi

Jarno, it does work. Thx very much.
The Problem: *[$nodeNr] was not a number ('1', not 1)
*[position() = $nodeNr] is the correct solution.

Thx and have a nice day...

Bule

-----Ursprüngliche Nachricht-----
Von: Jarno.Elovirta@xxxxxxxxx [mailto:Jarno.Elovirta@xxxxxxxxx]
Gesendet: Montag, 12. Mai 2003 15:22
An: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Betreff: RE:  Apply-Templates


Hi,

> I use the Function <xsl:apply-templates> to Apply a set of Template.

Not that it makes any difference here, the XSLT spec uses the word
"instruction" to describe elements in the XSLT namespace; also, with
xsl:apply-templates you don't "apply a set of templates", but rather you
"select a set of nodes and apply their templates in document order".

> Because the calls are dynamic, i built the Node/Nodepaths up 
> as follows:
> 
> 	<xsl:apply-templates select="layout/page-setup/*[$nodeNr]"/>
> It does not work. The Nodes to be execute are all Template 
> are linked with
> the Nodes underneath page-setup...

If $nodeNr is of type number, then it's a shorthand for

  <xsl:apply-templates select="layout/page-setup/*[position() = $nodeNr]"/>

otherwise the boolean valua of $nodeNr will be used, and that's probably not
what you want. Use the predicate above, or make sure $nodeNr is bound to a
number.

Cheers,

Jarno - neuroticfish: m.f.a.p.l. (intelligent tribal freak mix)

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


___________________________________________________________________________________
 
Diese E-Mail ist nur fuer die als Empfaenger genannte Person oder Gesellschaft bestimmt. Wenn Sie diese
E-Mail irrtuemlich erhalten haben, bitten wir Sie, den Absender zu benachrichtigen und die E-Mail auf Ihrem
Computersystem zu loeschen.
___________________________________________________________________________________
 


 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.