xsl-list
[Top] [All Lists]

RE: Process the nodes from copy-of element

2005-12-06 05:46:36
Hello Ragulf,

Thanks for the suggestion...

I have used the following way in my XSL. 
<xsl:variable name="strTopLeftIcon">
<!-- The expression that generates the value of the
variable here -->
</xsl:variable>

Now, it is working..

Thanks
Regards,
Raj



--- Ragulf Pickaxe <ragulf(_dot_)pickaxe(_at_)hotmail(_dot_)com> wrote:


Is there any way to process the nodes from the
<xsl:copy-of select=""/>

Not in the usual way. But anyway, this is not your
problem, see below.

<Box name="iconsarea">
<xsl:copy-of select="$strTopLeftIcon"/>
</Box>

<Snip/>

I want to process <image> using that
$strTopLeftIcon..
Is it possible?

This should be very possible, provided that
$strTopLeftIcon is a nodeset.

<Snip/>
I am using XSLT version 1.0.. it gives the
following
error..

(Location of error unknown)XSLT Error
(org.apache.xpath.XPathException): Can not
 convert #RTREEFRAG to a NodeList!

The error message states that this is not a nodeset
(I presume that we are 
talking about $strTopLeftIcon here ). Since you have
not shown us how 
$strTopLeftIcon is created, it is a little hard to
tell what may be wrong.

My guess is that you have created the variable like
this:

<xsl:variable name="strTopLeftIcon">
  <!-- The expression that generates the value of
the variable here -->
</xsl:variable>

This variable (in XSLT 1.0) creates a Result Tree
Fragment, which is not a 
nodeset.

You need to use this construct:
<xsl:variable name="strTopLeftIcon"
select="YourExpressionHere"/>

This will create a nodeset.

If it is not possible to have such a construct, you
will have to use an 
extension function, that can take a tree fragment
and convert it into a 
nodeset. The exact syntax is processor dependent,
but most processors have 
this extension.

Any solution or suggestion..

See above :-)

Regards,
Ragulf Pickaxe :-)


_________________________________________________________________
Få alle de nye og sjove ikoner med MSN Messenger
http://messenger.msn.dk/



--~------------------------------------------------------------------
XSL-List info and archive: 
http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to:
http://lists.mulberrytech.com/xsl-list/
or e-mail:
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--





                
__________________________________________________________ 
Enjoy this Diwali with Y! India Click here 
http://in.promos.yahoo.com/fabmall/index.html

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--