Re: [xslt] weird func:result/xsl:variable/exsl:node-set interaction



  okay can you bugzilla this so it's not lost ?
 
   thanks,

Daniel

On Wed, May 28, 2003 at 02:56:07PM -0500, Brett Kail wrote:
> Hello,
> 
> Below is a reduced testcase of what I was trying to accomplish with 
> <func:result/>:
> 
> <?xml version="1.0"?>
> 
> <xsl:stylesheet version="1.0"
>                 xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
>                 xmlns:exsl="http://exslt.org/common";
>                 xmlns:func="http://exslt.org/functions";
>                 xmlns:my="http://www.xontech.com/functions";
>                 extension-element-prefixes="func">
>         <func:function name="my:check">
>                 <xsl:variable name="test">
>                         <node/>
>                 </xsl:variable>
>                 <xsl:variable name="test-node" 
> select="exsl:node-set($test)/*"/>
>                 <func:result select="$test-node"/>
>         </func:function>
>         <xsl:template match="/">
>                 <xsl:copy-of select="my:check()"/>
>         </xsl:template>
> </xsl:stylesheet>
> 
> I ran it with 'xsltproc test.xslt test.xslt' and the result is a very 
> strange element name and namespace that appear to come from invalid memory 
> reads.  I was hoping for something along the lines of:
> 
> <?xml version="1.0"?>
> <node/>
> 
> An 'xsltproc --version' gives:
> 
> Using libxml 20507, libxslt 10030 and libexslt 720
> xsltproc was compiled against libxml 20507, libxslt 10030 and libexslt 720
> libxslt 10030 was compiled against libxml 20507
> libexslt 720 was compiled against libxml 20507
> 
> I'm working with obscure cases of xslt extensions, so I can understand if 
> what I'm trying to do is unsupported.  However, I think that the invalid 
> memory reads should probably be looked into :).  In an attempt to further 
> reduce the testcase, I just noticed the removing the extra step with the 
> second <xsl:variable/> in my:check() seems to work fine (i.e. <func:result 
> select="exsl:node-set($test)/*"/>).
> 
> Thanks!
> -Brett
> 
> _________________________________________________________________
> Add photos to your e-mail with MSN 8. Get 2 months FREE*.  
> http://join.msn.com/?page=features/featuredemail
> 
> _______________________________________________
> xslt mailing list, project page http://xmlsoft.org/XSLT/
> xslt@gnome.org
> http://mail.gnome.org/mailman/listinfo/xslt

-- 
Daniel Veillard      | Red Hat Network https://rhn.redhat.com/
veillard@redhat.com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]