You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by "Stoeckel, Matthias" <Ma...@Dresdner-Bank.com> on 2003/05/22 10:43:39 UTC
AW: That ole "org.apache.xml.dtm.DTMException: No more DTM IDs ar
e av ailable" again...
Hi Lee,
the two template parts below are called very often. Try to change the parts
in your stylesheet. I didn't try it myself, but this could be a workaround.
Cheers
Matthias
<xsl:template match="ROW">
<xsl:for-each select="COL">
<xsl:apply-templates select=".">
<xsl:with-param name="rownumber"><xsl:number level="any"
from="CONTENT" count="ROW"/></xsl:with-param>
</xsl:apply-templates>
</xsl:for-each>
</xsl:template>
<xsl:template match="COL">
<xsl:param name="rownumber">0</xsl:param>
<gmr:Cell ValueType="60">
<xsl:attribute name="Col">
<xsl:number level="any" from="ROW" count="COL"/>
</xsl:attribute>
<xsl:attribute name="Row">
<xsl:value-of select="$rownumber"/>
</xsl:attribute>
<gmr:Content>
<xsl:value-of select="."/>
</gmr:Content>
</gmr:Cell>
</xsl:template>
---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org
Re: AW: That ole "org.apache.xml.dtm.DTMException: No more DTM IDs
are available" again...
Posted by Joerg Heinicke <jo...@gmx.de>.
Stoeckel, Matthias wrote:
> Hi Lee,
>
> the two template parts below are called very often. Try to change the parts
> in your stylesheet. I didn't try it myself, but this could be a workaround.
> Cheers
> Matthias
>
> <xsl:template match="ROW">
> <xsl:for-each select="COL">
> <xsl:apply-templates select=".">
> <xsl:with-param name="rownumber"><xsl:number level="any"
> from="CONTENT" count="ROW"/></xsl:with-param>
> </xsl:apply-templates>
> </xsl:for-each>
> </xsl:template>
Maybe it's because of your <xsl:number level="any"/>. Is it really any
hierarchy level? This forces Xalan to search for ROWs in the whole document.
Were the ROWs not simply a sequence?
At least you can change the template to
<xsl:template match="ROW">
<xsl:apply-templates select="COL">
<xsl:with-param name="rownumber">
<xsl:number level="any" from="CONTENT" count="ROW"/>
</xsl:with-param>
</xsl:apply-templates>
</xsl:template>
or so my guess to:
<xsl:template match="ROW">
<xsl:apply-templates select="COL">
<xsl:with-param name="rownumber" select="position()"/>
</xsl:apply-templates>
</xsl:template>
> <xsl:template match="COL">
> <xsl:param name="rownumber">0</xsl:param>
> <gmr:Cell ValueType="60">
> <xsl:attribute name="Col">
> <xsl:number level="any" from="ROW" count="COL"/>
> </xsl:attribute>
> <xsl:attribute name="Row">
> <xsl:value-of select="$rownumber"/>
> </xsl:attribute>
> <gmr:Content>
> <xsl:value-of select="."/>
> </gmr:Content>
> </gmr:Cell>
> </xsl:template>
Same here.
<xsl:template match="COL">
<!-- avoids Result Tree Fragments -->
<xsl:param name="rownumber" select="0"/>
<gmr:Cell ValueType="60" Col="{position()}" Row="{$rownumber}">
<xsl:value-of select="."/>
</gmr:Cell>
</xsl:template>
Regards,
Joerg
--
System Development
VIRBUS AG
Fon +49(0)341-979-7419
Fax +49(0)341-979-7409
joerg.heinicke@virbus.de
www.virbus.de
---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org