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

Re: top level params and xsl:attribute magic?

Subject: Re: top level params and xsl:attribute magic?
From: Mike Brown <mike@xxxxxxxx>
Date: Sat, 18 Jan 2003 17:29:13 -0700 (MST)
mike brown magic
S Woodside wrote:
> On Saturday, January 18, 2003, at 02:38  AM, Roger Glover wrote:
> > Now we get to the really hairy part.  You see, in XSLT 1.0, a "result 
> > tree fragment" is a bit like a "node set", but not exactly.  Result 
> > tree fragments are conceptually tied to output, while node sets are 
> > conceptually tied to input.  Practically, this means that a "result 
> > tree fragment" cannot be used in many contexts where a "node set" is 
> > expected.  Hence it is much more than likely that in the context
> > where you are using "$StartNode" (2), the "result tree fragment" it 
> > contains evaluates as an empty "node set".

Roger wasn't entirely accurate with that last sentence. A result tree fragment
has a root node. Therefore, it is not equivalent to an empty node-set. The
root node's string-value might be an empty string (thus accounting for the
illusion that the RTF is empty), but the RTF itself will never test as boolean
false, and count() on the RTF will always be 1.

> Well, actually I was thinking about inserting an attribute into the 
> output without it being attached to any element. that's illegal isn't 
> it?

As I mentioned before, the spec says that it is an error, but one that
a processor can ignore (by ignoring the offending xsl:attribute instruction 
altogether)

Mike

-- 
  Mike J. Brown   |  http://skew.org/~mike/resume/
  Denver, CO, USA |  http://skew.org/xml/

 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.