|
top
|
 Subject: No Topic Author: (Deleted User) Date: 02 May 2008 10:52 AM
|
Hi Jon,
the mismatch in our conversation is caused by the fact that you are talking about an attribute created in the output, that cannot be accessed using XPath as it doesn't belong to the source tree (indeed, when you are creating the Header output element, the ProductRevision elements haven't been created yet, you cannot gather their ids).
You need to either:
1) write two stylesheets, where the first one creates the three Product, ProductRevision and Form element while the second one builds the Header using as input the output of the first, or
2) compute the three elements as the value of a single variable, and then build the Header by querying the variable, followed by a copy-of of the variable itself, or
3) duplicate the code that computes the id as part of the Header computation (e.g.
<xsl:attribute name="traverseRootDefs">
<xsl:for-each select="/ns1:eCrfs/ns1:eCrfs">
<xsl:value-of select="concat('#',count(preceding-sibling::*)*30+2)"/>
</xsl:for-each>
</xsl:attribute>) even if this means you could have problems in maintaining the two expression aligned
Hope this helps,
Alberto
|
|
|