[ http://issues.apache.org/jira/browse/COCOON-740?page=all ] Pier Fumagalli deleted COCOON-740: ----------------------------------
> a crash in the name() function of the xslt, when using SQL transformer > ---------------------------------------------------------------------- > > Key: COCOON-740 > URL: http://issues.apache.org/jira/browse/COCOON-740 > Project: Cocoon > Type: Bug > Environment: Operating System: Linux > Platform: PC > Reporter: Jose de Zarate > Assignee: 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: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira
