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

Re: Future XSLT expansion.

Subject: Re: Future XSLT expansion.
From: "Jon Smirl" <jonsmirl@xxxxxxxxxxxx>
Date: Sun, 19 Mar 2000 12:03:23 -0500
martin smirl
Variables contain result tree fragments. A result tree fragment (the stuff
inside the variable) only allows a subset of the node set operations.  Using
the result tree fragment in <xsl:apply-templates select="$x"> would require
the use of /, //, and [] even if only implicitly and the spec forbids this.

Without this restriction stylesheets couldn't be completely compiled. XSL
would have to have a run-time eval function.

XSLT Section 11.1 is what forbids this, you just didn't quote enough of it
in your earlier mail.

11.1 Result Tree Fragments
Variables introduce an additional data-type into the expression language.
This additional data type is called result tree fragment. A variable may be
bound to a result tree fragment instead of one of the four basic XPath
data-types (string, number, boolean, node-set). A result tree fragment
represents a fragment of the result tree. A result tree fragment is treated
equivalently to a node-set that contains just a single root node. However,
the operations permitted on a result tree fragment are a subset of those
permitted on a node-set. An operation is permitted on a result tree fragment
only if that operation would be permitted on a string (the operation on the
string may involve first converting the string to a number or boolean). In
particular, it is not permitted to use the /, //, and [] operators on result
tree fragments. When a permitted operation is performed on a result tree
fragment, it is performed exactly as it would be on the equivalent node-set.


Jon Smirl
jonsmirl@xxxxxxxxxxxx



 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.