xml-xalan-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brian Minchau (JIRA)" <xalan-...@xml.apache.org>
Subject [jira] Updated: (XALANJ-1869) XSLTC: exsl:node-set gives null pointer exception when casting a string to a text node
Date Tue, 09 Aug 2005 04:40:23 GMT
     [ http://issues.apache.org/jira/browse/XALANJ-1869?page=all ]

Brian Minchau updated XALANJ-1869:
----------------------------------

    Fix Version: 2.7

> XSLTC: exsl:node-set gives null pointer exception when casting a string to a text node
> --------------------------------------------------------------------------------------
>
>          Key: XALANJ-1869
>          URL: http://issues.apache.org/jira/browse/XALANJ-1869
>      Project: XalanJ2
>         Type: Bug
>   Components: XSLTC
>     Versions: 2.5Dx
>  Environment: Operating System: Windows XP
> Platform: PC
>     Reporter: Daniel Neades
>     Assignee: Yash Talwar
>      Fix For: 2.7
>  Attachments: Patch.txt
>
> According to the documentation at http://www.exslt.org/exsl/functions/node-set/,
> the exslt node-set function should be able to turn a string into a text node.
> Thus, the following stylesheet should be legal:
> <?xml version="1.0" encoding="utf-8" ?>
> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
> xmlns:exsl="http://exslt.org/common">
>     <xsl:output method="xml" encoding="US-ASCII" />
>     <xsl:template match="/">
>         <xsl:variable name="text">Some text</xsl:variable>
>         <xsl:apply-templates select="exsl:node-set($text)" />
>     </xsl:template>
> </xsl:stylesheet>
> However, an attempt to execute this stylesheet with XSLTC (from Xalan 2.6.0)
> causes a NullPointerException:
> ERROR:  ''
> <?xml version="1.0"
> encoding="US-ASCII"?>javax.xml.transform.TransformerException:
> java.lang.NullPointerException
>         at
> org.apache.xalan.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:613)
>         at
> org.apache.xalan.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:286)
>         at Test.main(test.java:62)
> Caused by: java.lang.NullPointerException
>         at
> org.apache.xalan.xsltc.dom.DOMAdapter.getExpandedTypeID(DOMAdapter.java:232)
>         at org.apache.xalan.xsltc.dom.MultiDOM.getExpandedTypeID(MultiDOM.java:431)
>         at KtPageLayout_EN.applyTemplates()
>         at KtPageLayout_EN.template$dot$0()
>         at KtPageLayout_EN.applyTemplates()
>         at KtPageLayout_EN.transform()
>         at
> org.apache.xalan.xsltc.runtime.AbstractTranslet.transform(AbstractTranslet.java:580)
>         at
> org.apache.xalan.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:606)
>         ... 2 more
> ---------
> java.lang.NullPointerException
>         at
> org.apache.xalan.xsltc.dom.DOMAdapter.getExpandedTypeID(DOMAdapter.java:232)
>         at org.apache.xalan.xsltc.dom.MultiDOM.getExpandedTypeID(MultiDOM.java:431)
>         at KtPageLayout_EN.applyTemplates()
>         at KtPageLayout_EN.template$dot$0()
>         at KtPageLayout_EN.applyTemplates()
>         at KtPageLayout_EN.transform()
>         at
> org.apache.xalan.xsltc.runtime.AbstractTranslet.transform(AbstractTranslet.java:580)
>         at
> org.apache.xalan.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:606)
>         at
> org.apache.xalan.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:286)
>         at Test.main(test.java:62)
> With the Xalan 2.6.0 interpretive processor, this stylesheet causes a
> stackoverflow exception. I'm not quite sure why. Change the template's match="/"
> attribute to something like match="dx:element", and it works as expected with
> the interpretive processor (although it still gives a NullPointerException with
> XSLTC). Perhaps I'm missing something obvious?
> Further background information: the source document that I'm using to reproduce
> this is passed to the stylesheet as a DOMSource, built with Xerces.
> --
> Daniel Neades
> Araxis Ltd
> www.araxis.com

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org


Mime
View raw message