Community Tip - You can subscribe to a forum, label or individual post and receive email notifications when someone posts a new topic or reply. Learn more! X
I'm tracking down problems with using the Army LOGSA v1.5 XML stylesheets in Arbortext 5.4 M020.
I've tracked down a problem with the PE crashing on the tables stylesheet to a lack of an inherited table value. This happens in a couple of places with a couple different variables (rowsep and colsep that I know of so far).
Can any of you see why $rowsep is losing its inherited value? The workaround at the moment is to give every single row a rowsep (ditto with colsep). Setting it in the table tag is not sufficient.
Here is where it dies if rowsep = " with the error "Cannot convert string " to a double":
<xsl:if test="(($frame" ==" 'all'=" or=" $frame="topbot" or=" $frame="bottom" )=" and=" $lastrow="0)" or=" <b=">$rowsep!=0">
Here's the code fragment that sets $rowsep followed by inherited.table.attribute template followed by get-attribute template
<xsl:variable name="<b">rowsep">
<xsl:call-template name="inherited.table.attribute">
<xsl:with-param name="entry" select="."> </xsl:with-param>
<xsl:with-param name="colnum" select="$entry.colnum"> </xsl:with-param>
<xsl:with-param name="attribute" select="<b">rowsep"> </xsl:with-param>
</xsl:call-template>
</xsl:variable>
<xsl:template name="inherited.table.attribute">
<xsl:param name="entry" select="."> </xsl:param>
<xsl:param name="colnum" select="0"> </xsl:param>
<xsl:param name="attribute" select="colsep"> </xsl:param>
<xsl:variable name="entry.value">
<xsl:call-template name="get-attribute">
<xsl:with-param name="element" select="$entry"> </xsl:with-param>
<xsl:with-param name="attribute" select="$attribute"> </xsl:with-param>
</xsl:call-template>
</xsl:variable>
<xsl:variable name="row.value">
<xsl:call-template name="get-attribute">
<xsl:with-param name="element" select="$entry/ancestor::row[1]"> </xsl:with-param>
<xsl:with-param name="attribute" select="$attribute"> </xsl:with-param>
</xsl:call-template>
</xsl:variable>
<xsl:variable name="span.value">
<xsl:if test="$entry/@spanname">
<xsl:variable name="spanname" select="$entry/@spanname"> </xsl:variable>
<xsl:variable name="spanspec" select="$entry/ancestor::tgroup/spanspec[@spanname=$spanname]"> </xsl:variable>
<xsl:variable name="span.colspec" select="$entry/ancestor::tgroup/colspec[@colname=$spanspec/@namest]"> </xsl:variable>
<xsl:variable name="spanspec.value">
<xsl:call-template name="get-attribute">
<xsl:with-param name="element" select="$spanspec"> </xsl:with-param>
<xsl:with-param name="attribute" select="$attribute"> </xsl:with-param>
</xsl:call-template>
</xsl:variable>
<xsl:variable name="scolspec.value">
<xsl:call-template name="get-attribute">
<xsl:with-param name="element" select="$span.colspec"> </xsl:with-param>
<xsl:with-param name="attribute" select="$attribute"> </xsl:with-param>
</xsl:call-template>
</xsl:variable>
<xsl:choose>
<xsl:when test="$spanspec.value" !=" "=">
<xsl:value-of select="$spanspec.value"/">
</xsl:when>
<xsl:when test="$scolspec.value" !=" "=">
<xsl:value-of select="$scolspec.value"/">
</xsl:when>
<xsl:otherwise> </xsl:otherwise>
</xsl:choose>
</xsl:if>
</xsl:variable>
<xsl:variable name="namest.value">
<xsl:if test="$entry/@namest">
<xsl:variable name="namest" select="$entry/@namest"> </xsl:variable>
<xsl:variable name="colspec" select="$entry/ancestor::tgroup/colspec[@colname=$namest]"> </xsl:variable>
<xsl:variable name="namest.value">
<xsl:call-template name="get-attribute">
<xsl:with-param name="element" select="$colspec"> </xsl:with-param>
<xsl:with-param name="attribute" select="$attribute"> </xsl:with-param>
</xsl:call-template>
</xsl:variable>
<xsl:choose>
<xsl:when test="$namest.value">
<xsl:value-of select="$namest.value"/">
</xsl:when>
<xsl:otherwise> </xsl:otherwise>
</xsl:choose>
</xsl:if>
</xsl:variable>
<xsl:variable name="tgroup.value">
<xsl:call-template name="get-attribute">
<xsl:with-param name="element" select="$entry/ancestor::tgroup[1]"> </xsl:with-param>
<xsl:with-param name="attribute" select="$attribute"> </xsl:with-param>
</xsl:call-template>
</xsl:variable>
<xsl:choose>
<xsl:when test="$entry.value" !=" "=">
<xsl:value-of select="$entry.value"/">
</xsl:when>
<xsl:when test="$row.value" !=" "=">
<xsl:value-of select="$row.value"/">
</xsl:when>
<xsl:when test="$span.value" !=" "=">
<xsl:value-of select="$span.value"/">
</xsl:when>
<xsl:when test="$namest.value" !=" "=">
<xsl:value-of select="$namest.value"/">
</xsl:when>
<xsl:when test="$colnum"> 0">
<xsl:variable name="calc.colvalue">
<xsl:call-template name="colnum.colspec">
<xsl:with-param name="colnum" select="$colnum"> </xsl:with-param>
<xsl:with-param name="attribute" select="$attribute"> </xsl:with-param>
</xsl:call-template>
</xsl:variable>
<xsl:choose>
<xsl:when test="$calc.colvalue" !=" "=">
<xsl:value-of select="$calc.colvalue"/">
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$tgroup.value"/">
</xsl:otherwise>
</xsl:choose>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$tgroup.value"/">
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template name="get-attribute">
<xsl:param name="element" select="."> </xsl:param>
<xsl:param name="attribute" select=""> </xsl:param>
<xsl:for-each select="$element/@*">
<xsl:if test="local-name(.)" ==" $attribute"=">
<xsl:value-of select="."/">
</xsl:if>
</xsl:for-each>
</xsl:template>
===== END CODE snippet =====