IMPORTANT:
this is not a Support Forum! Experienced users might answer from time to time questions posted here. If you need a professional and reliable answer, or if you want to report a bug, please contact Altova Support instead.

variable duplication error Options · View
serhiol
Posted: Monday, March 2, 2009 4:18:46 PM
Rank: Newbie

Joined: 2/27/2009
Posts: 76
Location: Paris, France
Hello,

When transforming with the generated XSLT file (when transforming with .NET, or Word, or other client but StyleVision), I obtains an error, because a variable was duplicated in the same context:

<xsl:variable name="altova:RowStyle0">
<xsl:text>\trrh0\trhdr</xsl:text>
<xsl:variable name="altova:CurrGridPos_0" select="$altova:nTableIndentTw_0"/>
<xsl:text>\clvertalc\clbrdrt\brdrs\brdrcf142\brdrw15\clbrdrb\brdrs\brdrcf143\brdrw15\clbrdrl\brdrs\brdrcf142\brdrw15\clbrdrr\brdrs\brdrcf143\brdrw15\clpadl0\clpadfl3\clpadb0\clpadfb3\clpadt0\clpadft3\clpadr0\clpadfr3\cellx</xsl:text>
<xsl:variable name="altova:CurrGridPos_0" select="$altova:CurrGridPos_0 + $altova:nColumnWidthTw_0_0"/>
<xsl:value-of select="ceiling($altova:CurrGridPos_0)"/>
<xsl:text>\clvertalc\clbrdrt\brdrs\brdrcf142\brdrw15\clbrdrb\brdrs\brdrcf143\brdrw15\clbrdrl\brdrs\brdrcf142\brdrw15\clbrdrr\brdrs\brdrcf143\brdrw15\clpadl0\clpadfl3\clpadb0\clpadfb3\clpadt0\clpadft3\clpadr0\clpadfr3\cellx</xsl:text>
<xsl:variable name="altova:CurrGridPos_0" select="$altova:CurrGridPos_0 + $altova:nColumnWidthTw_0_1"/>
<xsl:value-of select="ceiling($altova:CurrGridPos_0)"/>
</xsl:variable>


This "duplication" appears when I try to inset a table(even empty) with multiple columns and rows.

When previewing the file in StyleVision or transforming this file with XmlSpy everything works... I ask myself how is it possible..., probably Altova in its applications does not respect exactly the XSLT rules...

serhiol
Posted: Tuesday, March 3, 2009 10:56:30 AM
Rank: Newbie

Joined: 2/27/2009
Posts: 76
Location: Paris, France
I tried to change the generated node

<xsl:variable name="altova:RowStyle0">
<xsl:text>\trrh0</xsl:text>
<xsl:variable name="altova:CurrGridPos_0" select="$altova:nTableIndentTw_0"/>
<xsl:text>\clvertalc\clbrdrt\brdrs\brdrcf142\brdrw15\clbrdrb\brdrs\brdrcf143\brdrw15\clbrdrl\brdrs\brdrcf142\brdrw15\clbrdrr\brdrs\brdrcf143\brdrw15\clpadl30\clpadfl3\clpadb30\clpadfb3\clpadt30\clpadft3\clpadr30\clpadfr3\cellx</xsl:text>
<xsl:variable name="altova:CurrGridPos_1" select="$altova:CurrGridPos_0 + $altova:nColumnWidthTw_0_0"/>
<xsl:value-of select="ceiling($altova:CurrGridPos_0)"/>
<xsl:text>\clvertalc\clbrdrt\brdrs\brdrcf142\brdrw15\clbrdrb\brdrs\brdrcf143\brdrw15\clbrdrl\brdrs\brdrcf142\brdrw15\clbrdrr\brdrs\brdrcf143\brdrw15\clpadl30\clpadfl3\clpadb30\clpadfb3\clpadt30\clpadft3\clpadr30\clpadfr3\cellx</xsl:text>
<xsl:variable name="altova:CurrGridPos_2" select="$altova:CurrGridPos_1 + $altova:nColumnWidthTw_0_1"/>
<xsl:value-of select="ceiling($altova:CurrGridPos_1)"/>
</xsl:variable>


and at least it works, but I am not sure what should really be inside...

It's clear that this is a bug in StyleVision... Even two, if we consider that the transformation should not pass using the generated version of XSLT.
vlad
Posted: Tuesday, March 3, 2009 11:23:35 AM
Rank: Advanced Member

Joined: 12/13/2005
Posts: 2,856
Location: Mauritius
Yes, you are right, both bugs should be resolved in the upcoming Service Pack (no due date yet available)
serhiol
Posted: Tuesday, March 3, 2009 12:31:17 PM
Rank: Newbie

Joined: 2/27/2009
Posts: 76
Location: Paris, France
ok. Thanks.
adam.graham
Posted: Monday, October 26, 2009 2:40:01 PM
Rank: Newbie

Joined: 10/26/2009
Posts: 6
Location: Lebanon, VA
This issue still seems to exist as of service pack 1. Is the above service pack referenced sp1, or a subsequent pack that still hasn't been released? This is a pretty huge issue that will influence our license upgrade purchase.
vlad
Posted: Monday, October 26, 2009 4:54:34 PM
Rank: Advanced Member

Joined: 12/13/2005
Posts: 2,856
Location: Mauritius
This issue has been definitely resolved (as many customers have already confirmed) in the current v2009sp1 release. Please make sure to download the latest installer and use it.
adam.graham
Posted: Monday, October 26, 2009 7:43:17 PM
Rank: Newbie

Joined: 10/26/2009
Posts: 6
Location: Lebanon, VA
Is there any reason it would not be resolved in the Enterprise Edition trial version? I produced the actual xslt out of the File > Save Generated Files menu option. Is there anything I could be doing wrong?
vlad
Posted: Monday, October 26, 2009 9:26:34 PM
Rank: Advanced Member

Joined: 12/13/2005
Posts: 2,856
Location: Mauritius
Trial version is the same. The only thing which might be wrong is that you don't have the latest .exe Uninstall yours, download the newest one from the web and install again - everything should be fine then.
island
Posted: Wednesday, October 28, 2009 5:32:55 AM
Rank: Newbie

Joined: 10/28/2002
Posts: 1,283
Location: AT
The bug only applies to xslt 1.0. In xslt 2.0 it is possible to declare variables of the same name in the same context (shadowing). If you are using .Net to transform your xml files, you should only use xslt 1.0 stylesheets because .net is not xslt 2.0 compliant.

adam.graham
Posted: Wednesday, October 28, 2009 11:36:15 AM
Rank: Newbie

Joined: 10/26/2009
Posts: 6
Location: Lebanon, VA
Absolutely correct, and I believe I'm correct in saying that this particular thread did not hint at this fact before now. Since .Net was our launching platform, it was of course expecting valid xslt 1.0 code instead of the 2.0 we were generating originally. After switching to 1.0, everything is as it should be.

Thanks so much for everyone's input.
Users browsing this topic
guest

Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Use of the Altova User Forum(s) is governed by the Altova Terms of Use.