RE: [xsl] top level params and xsl:attribute magic?

Subject: RE: [xsl] top level params and xsl:attribute magic?
From: Américo Albuquerque <aalbuquerque@xxxxxxxxxxxxxxxx>
Date: Mon, 20 Jan 2003 15:00:10 -0000
Hi Mike.
Having the RTF a sigle root node it can be called as '/' ??? If so,
setting a argument to the '/' node still be an error, right? And this
falls into those errors that the processor can ignore, so doing
something like:
<xsl:variable name="arg">
 <xsl:attribute name="something">hello</xsl:attribute>
</xsl:variable>
Will be an error (might be reported or not) and the final variable will
be just '/'.
Is this right?

Thanks in advance.

-----Original Message-----
From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx
[mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of Mike Brown
Sent: domingo, 19 de Janeiro de 2003 0:29
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: Re: [xsl] top level params and xsl:attribute 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


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread