[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Res: org.apache.xpath.objects.XRTreeFrag error
I've already done the changes, but I'm still getting the error on line "<xsl:for-each select="$node/*/*">". I don't know how to avod this tree fragment. The new code is bellow. <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" select="$comp1"/> </xsl:call-template> </xsl:variable> <xsl:variable name="string2"> <xsl:call-template name="stringify"> <xsl:with-param name="node" select="$comp2"/> </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())">< <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" select="."/> </xsl:call-template></ <xsl:value-of select="local-name()"/>></xsl:when> <xsl:otherwise> <xsl:value-of select="normalize-space(.)"/> </xsl:otherwise> </xsl:choose> </xsl:for-each> </xsl:template> Thanks a lot. Leopoldo ----- Mensagem original ---- De: Michael Kay <mike@xxxxxxxxxxxx> Para: xsl-list@xxxxxxxxxxxxxxxxxxxxxx Enviadas: Domingo, 25 de Margo de 2007 20:42:07 Assunto: RE: org.apache.xpath.objects.XRTreeFrag error If you make the changes to avoid the unnecessary copying of data into result tree fragments (as suggested in my earlier response) then you should not be getting this error. Michael Kay http://www.saxonica.com/ > -----Original Message----- > From: Lepoldo Melo [mailto:leopoldosmj@xxxxxxxxxxxx] > Sent: 26 March 2007 00:26 > To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx > Subject: Res: org.apache.xpath.objects.XRTreeFrag error > > My code is ok, but it doesn't work with Xalan 2.5.2. > > The error is described at > http://www.biglist.com/lists/xsl-list/archives/200505/msg00391.html. > > The XRTreeFrag error happens on line "<xsl:for-each > select="$node/*/*">". > > ----- Mensagem original ---- > De: Florent Georges <darkman_spam@xxxxxxxx> > Para: xsl-list@xxxxxxxxxxxxxxxxxxxxxx > Enviadas: Domingo, 25 de Margo de 2007 14:29:34 > Assunto: Re: org.apache.xpath.objects.XRTreeFrag error > > Lepoldo Melo wrote: > > Hi > > > Okay. Thanks, but I still don't know how to solve the line > > "<xsl:for-each select="$node/*/*">". > > What do you mean by "solving"? > > Your code seems ok with that, both in XSLT 1.0 and 2.0 (as > long as in XSLT 1.0 you pass a reference to an input tree, > and what you showed is not enough to be sure on that point). > > So what exactly is the problem? > > Regards, > > --drkm > > > > > > > > > > > > > > > > > > > > > > > > > > > ______________________________________________________________ > _____________ > Dicouvrez une nouvelle fagon d'obtenir des riponses ` toutes > vos questions ! > Profitez des connaissances, des opinions et des expiriences > des internautes sur Yahoo! Questions/Riponses > http://fr.answers.yahoo.com > > --~------------------------------------------------------------------ > 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@xxxxxxxxxxxxxxxxxxxxxx> > --~-- > > > > > > __________________________________________________ > Fale com seus amigos de graga com o novo Yahoo! Messenger > http://br.messenger.yahoo.com/ > > --~------------------------------------------------------------------ > 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@xxxxxxxxxxxxxxxxxxxxxx> > --~-- __________________________________________________ Fale com seus amigos de graga com o novo Yahoo! Messenger http://br.messenger.yahoo.com/
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|