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

Re: question about identity transform

Subject: Re: question about identity transform
From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx>
Date: Wed, 01 Nov 2006 18:27:50 -0500
Re:  question about identity transform
At 05:01 PM 10/31/2006, Dimitre wrote:
If you would refers it, and make it, say: ` node ( ) | @* ' the nodes
would first be copied, resulting in the attributes ending up illegally:
you may not create an attribute node after you create an element node in
the result tree. However, I'm not sure if this is really enforced by the
specs.

This is not true.


The order in which an <xsl:apply-templates> instruction is applied on
the nodes selected by the expression as specified in its select
attribute is not defined and may be in any order.

What is important, is that the results of these applications are
combined/ordered based on the document order of the processed nodes.

The analogy that occurred to me lately is the "take a number" routine you find in your local Division of Motor Vehicles (or the friendly bureaucracy of your choice if you're not a US resident). Applicants on arrival are given numbers that are then called in order, so while we're waiting around we don't actually have to stand in line.


While we're waiting, we typically fill out the forms that will be required of us.

In XSLT, it's as if the processing happens as we fill out the forms. The re-ordering only has to occur at serialization time.

The number, of course, is called "position()" (which you may note has nothing necessarily to do with how we were ordered when we arrived).

Cheers,
Wendell



======================================================================
Wendell Piez                            mailto:wapiez@xxxxxxxxxxxxxxxx
Mulberry Technologies, Inc.                http://www.mulberrytech.com
17 West Jefferson Street                    Direct Phone: 301/315-9635
Suite 207                                          Phone: 301/315-9631
Rockville, MD  20850                                 Fax: 301/315-8285
----------------------------------------------------------------------
  Mulberry Technologies: A Consultancy Specializing in SGML and XML
======================================================================

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-2011 All Rights Reserved.