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

RE: org.apache.xpath.objects.XRTreeFrag error

Subject: RE: org.apache.xpath.objects.XRTreeFrag error
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Sun, 25 Mar 2007 13:58:24 +0100
RE:  org.apache.xpath.objects.XRTreeFrag error
You're doing

                <xsl:with-param name="node">
                    <xsl:copy-of select="$comp1"/>
                </xsl:with-param>

There's no need to copy $comp1 into a new result tree fragment, you can pass
the supplied value directly to the called template. Use

<xsl:with-param name="node" select="$comp1"/>

You make the same mistake again with:

                          <xsl:with-param name="node">
>                             <xsl:copy-of select="."/>
>                         </xsl:with-param>

Michael Kay
http://www.saxonica.com/

> -----Original Message-----
> From: Lepoldo Melo [mailto:leopoldosmj@xxxxxxxxxxxx]
> Sent: 25 March 2007 04:56
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject:  org.apache.xpath.objects.XRTreeFrag error
>
> Hi everybody,
>
> I'm trying to use the XSL code bellow with Xalan 2.5.2 and
> I'm getting the error described at
> http://www.biglist.com/lists/xsl-list/archives/200505/msg00391
.html. The XRTreeFrag error is on line "".
>
> As you can see, I can't avoid to use a tree fragment. Did
> anyone have this problem? How can I solve it?
>
>     <xsl:template name="check_identical">
>         <xsl:param name="comp1"/>
>         <xsl:param name="comp2"/>
>         <xsl:variable name="string1">
>             <xsl:call-template name="stringify">
>                 <xsl:with-param name="node">
>                     <xsl:copy-of select="$comp1"/>
>                 </xsl:with-param>
>             </xsl:call-template>
>         </xsl:variable>
>         <xsl:variable name="string2">
>             <xsl:call-template name="stringify">
>                 <xsl:with-param name="node">
>                     <xsl:copy-of select="$comp2"/>
>                 </xsl:with-param>
>             </xsl:call-template>
>         </xsl:variable>
>         <xsl:value-of select="$string1=$string2"/>
>     </xsl:template>
>
>     <xsl:template name="stringify">
>         <xsl:param name="node"/>
>         <xsl:for-each select="$node/*/*">
>             <xsl:choose>
>                 <xsl:when test="boolean(local-name())">&lt;
>                     <xsl:value-of select="local-name()"/>
>                     <xsl:variable name="pos" select="position()"/>
>                     <xsl:for-each select="@*">
>                         <xsl:text> </xsl:text>
>                         <xsl:value-of
> select="local-name()"/>="<xsl:value-of select="."/>"</xsl:for-each>
>                     <xsl:call-template name="stringify">
>                         <xsl:with-param name="node">
>                             <xsl:copy-of select="."/>
>                         </xsl:with-param>
>                     </xsl:call-template>&lt;/
>                     <xsl:value-of
> select="local-name()"/>&gt;</xsl:when>
>                 <xsl:otherwise>
>                     <xsl:value-of select="normalize-space(.)"/>
>                 </xsl:otherwise>
>             </xsl:choose>
>         </xsl:for-each>
>     </xsl:template>
>
>
> Thanks.
> Leopoldo Melo
>
>
>
>
>
>
> __________________________________________________
> Fale com seus amigos  de graga com o novo Yahoo! Messenger
> http://br.messenger.yahoo.com/

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.