You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by Andrew Michael Eberbach <am...@student.math.uwaterloo.ca> on 2003/02/26 16:26:36 UTC

nodeset question

Hi,
I'm having some trouble with nodeset. I realize that it is just supposed
to be a cast from an RTF to a nodeset and that an RTF is, according to the
spec, supposed to be treated as a single node. The problem is I'd like to
save an rtf in a variable or param and build it up passing it through
templates. What I didn't realize is that if you put two elements:

<xsl:variable name="test">
  <foo/>
  <bar/>
</xsl:variable>

into a variable then do

<xsl:value-of select="count(xalan-nodeset($test))"/>

You get 1. Is there some way to extract the elements again?

Now the other problem is that copy-of has a bug in it. The bug appears
when I try to copy-of one of these element variables that has elements and
attributes that are bound to namespaces. It seems to work for the first
couple but then I get elements like

<foo xmlns="foosns" =""/>

Which I find odd.

Any help would be greatly appreciated.


Thanks,
Andrew


Re: nodeset question

Posted by Andrew Michael Eberbach <am...@student.math.uwaterloo.ca>.
I'm sorry I just got this.

The question of the null-like attributes that copy-of spits out is still
up in the air...

Thanks,
Andrew

On Wed, 26 Feb 2003, Joseph Kesselman wrote:

> I believe in that case the one node you get back is the DocumentFragment
> node. Its children will be the two elements contained in the RTF. (Plus
> any whitespace around/between them.)
>
> ______________________________________
> Joe Kesselman, IBM Next-Generation Web Technologies:
> XML, XSL and more.  "may'ron DaroQbe'chugh vaj bIrIQbej"
> ("Put down the squeezebox and nobody gets hurt.")
>


Re: nodeset question

Posted by Joseph Kesselman <ke...@us.ibm.com>.
I believe in that case the one node you get back is the DocumentFragment 
node. Its children will be the two elements contained in the RTF. (Plus 
any whitespace around/between them.)

______________________________________
Joe Kesselman, IBM Next-Generation Web Technologies:
XML, XSL and more.  "may'ron DaroQbe'chugh vaj bIrIQbej" 
("Put down the squeezebox and nobody gets hurt.")