You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by "Jörg Heinicke (JIRA)" <ji...@apache.org> on 2007/01/06 17:28:27 UTC

[jira] Closed: (COCOON-740) a crash in the name() function of the xslt, when using SQL transformer

     [ https://issues.apache.org/jira/browse/COCOON-740?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jörg Heinicke closed COCOON-740.
--------------------------------

    Resolution: Fixed

Maybe fixed with bugzilla 25203 (now COCOON-919) and without any reactions assuming it's fixed ...

> a crash in the name() function of the xslt, when using SQL transformer
> ----------------------------------------------------------------------
>
>                 Key: COCOON-740
>                 URL: https://issues.apache.org/jira/browse/COCOON-740
>             Project: Cocoon
>          Issue Type: Bug
>          Components: - Components: Sitemap
>    Affects Versions: 2.1 Milestone 2
>         Environment: Operating System: Linux
> Platform: PC
>            Reporter: Jose de Zarate
>         Assigned To: Cocoon Developers Team
>
> - when using sqltransformer, if on the pipeline the next transformer is standard 
> xslt, you can not use name() or local-name() functions for guessing the names of 
> the attributes of SQL namespaced elements. (rowset, by example). it throws al 
> ava.lang.indexOutofBounds exception. It only happens when you use it on 
> attributes:
> <xsl:for-each select="@*">
>   <xsl:attribute name="{name()}">blabla</xsl:attribute>
> </xsl:for-each>
> but <xsl:for-each select="@sql:*">
>   <xsl:attrbute name="{name()}">sdfsdf</xsl:attribute>
> </xsl:for-each>
> works fine.
> I think it only happes the firts time you "enter" a sql-namespaced element in 
> applying the templates.
> In cocoon2.0.4 this used to work fine.
> the stacktrace:
> java.lang.ArrayIndexOutOfBoundsException: 7 >= 1
> at java.util.Vector.elementAt(Vector.java:427)
> at org.apache.xml.dtm.ref.DTMStringPool.indexToString(DTMStringPool.java:137)
> at org.apache.xml.dtm.ref.sax2dtm.SAX2DTM2.getNodeName(SAX2DTM2.java:2770)
> at org.apache.xalan.xsltc.dom.SAXImpl.getNodeName(SAXImpl.java:1016)
> at org.apache.xalan.xsltc.dom.DOMAdapter.getNodeName(DOMAdapter.java:282)
> at cleanc.applyTemplates()
> at cleanc.applyTemplates()
> at cleanc.applyTemplates()
> at cleanc.transform()
> at org.apache.xalan.xsltc.runtime.AbstractTranslet.transform(AbstractTranslet.
> java:533)
> the stylesheet:
>   <xsl:template match="/">	 	
>   <xsl:apply-templates select="block"/>
> </xsl:template>
> <xsl:template match="block">
>   <xsl:copy>
>     <xsl:for-each select="@*">
>       <xsl:attribute name="{name()}">
>         <xsl:value-of select="."/>
>       </xsl:attribute>
>     </xsl:for-each>
>     <xsl:apply-templates select="sql:rowset"/>
>   </xsl:copy>
> </xsl:template>
> <xsl:template match="sql:rowset">
>   <xsl:copy>
>     <xsl:for-each select="@*">
>       <xsl:value-of select="local-name()"/>
>     </xsl:for-each>
>   </xsl:copy>
> </xsl:template>
> this stylesheet is applied after a standard SQLTransformation.
> and it crashes on "local-name()".

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