[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: Sat, 18 Mar 2000 16:43:47 -0500
Re: Future XSLT expansion.
From: "Didier PH Martin" <martind@xxxxxxxxxxxxx>
> So, always if I understood the text well (we are never sure with specs
:-))
> and if my lawyer says that we have jurisprudence here :-)) then, it seems
> that yes a variable element can contain structured content and not only
> strings.

Variables have always been able to contain structured content. The problem
is not with the variable definition it's with the <xsl:apply-template
select="$variable"/>. In my case the variable contains a result set fragment
and it's not legal to implicitly convert a result set fragment into a
node-set. I would need this: <xsl:apply-template
select="node-set($variable)"/>. Allowing this in the core would break the no
side effect rule.

> But I may be wrong and it is better if somebody else would check and
double
> check the specs to bring some more light. So that we can update our FAQ
> and conformance tests.

A while ago I exchanged direct email with James Clark that indicated that it
is indeed not legal to convert the contents of a variable into a node-set.
His response was that's what document('') is for. I did find this to be
non-obvious but it does work and XT is correct.

> "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

In another conversation we determined that there is a fifth XPath data type.
It's is an opaque variable datatype. Check the source of XT and you'll find
five datatypes. For example you can use extension functions to select a Java
class instance into an XSL variable. XSL can do nothing with the contents of
the variable except to pass it back to an extension function. I use this
feature to compute running totals efficiently.

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.