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

RE: processing order

Subject: RE: processing order
From: cknell@xxxxxxxxxx
Date: Tue, 27 Mar 2007 18:31:24 -0400
RE:  processing order
The short answer is, "You can't have that." Processing order is not guaranteed. The XSLT  processor may optimize in any way it sees fit.

The long answer is a question. "Why do you think you need to specify the processing order?"

When you've answered that question, we can get to a solution to the problem.
-- 
Charles Knell
cknell@xxxxxxxxxx - email



-----Original Message-----
From:     goncode <gonzalocordero@xxxxxxx>
Sent:     Tue, 27 Mar 2007 14:21:08 -0700
To:       xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject:   processing order

  Hi everyone:

This is my input:

<root>

 <dir name="StartMenu" label="StartMenu" icon="folder" size="340" 
modified="Fri Mar 23 15:21:47 PDT 2007" flags="1" 
path="/System/StartMenu" bgColor="null" bgImage="null" bgImageMode="2">
<dir name="Bookmarks" label="Bookmarks" icon="folder" size="238" 
modified="Fri Mar 16 11:53:15 PDT 2007" flags="1" 
path="/System/StartMenu/Bookmarks" bgColor="null" bgImage="null" 
bgImageMode="2"/>
<dir name="Control Panels" label="Control Panels" icon="folder" 
size="272" modified="Thu Mar 22 16:11:36 PDT 2007" flags="1" 
path="/System/StartMenu/Control Panels" bgColor="null" bgImage="null" 
bgImageMode="2"/>
<dir name="Programs" label="Programs" icon="folder" size="374" 
modified="Fri Mar 16 11:53:15 PDT 2007" flags="1" 
path="/System/StartMenu/Programs" bgColor="null" bgImage="null" 
bgImageMode="2"/>
<dir name="Widgets" label="Widgets" icon="folder" size="442" 
modified="Tue Mar 20 10:50:12 PDT 2007" flags="1" 
path="/System/StartMenu/Widgets" bgColor="null" bgImage="null" 
bgImageMode="2"/>
<file name="Help.desktop" label="Help" size="96" modified="Thu Mar 15 
09:46:45 PDT 2007" flags="66"/>
<file name="Logout.desktop" label="Logout" size="97" modified="Thu Mar 
22 15:18:05 PDT 2007" flags="66"/>
<file name="Synchronizer.desktop" label="Synchronizer" size="113" 
modified="Thu Mar 15 10:07:22 PDT 2007" flags="66"/>
<result status="ok" timeTaken="479"/>
</dir>
<result status="ok" timeTaken="577"/>
</root>

and I want these two elements

<file name="Help.desktop" label="Help" size="96" modified="Thu Mar 15 
09:46:45 PDT 2007" flags="66"/>
<file name="Logout.desktop" label="Logout" size="97" modified="Thu Mar 
22 15:18:05 PDT 2007" flags="66"/>

To be processed always last no matter what order they come from the xml 
file. They are children of this node:

<dir name="StartMenu" label="StartMenu" icon="folder" size="340" 
modified="Fri Mar 23 15:21:47 PDT 2007" flags="1" 
path="/System/StartMenu" bgColor="null" bgImage="null" bgImageMode="2">

and this is how my template looks like:


<xsl:template match="root">
<xsl:apply-templates/>
</xs:template>

<xsl:template match="dir">
process node
<xsl:apply-templates/>
</xsl:template>

<xsl:template match="file">
process node
</xsl:template>


How can I achieve that?

Thanks.

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.