Hi,
I am using Saxon from OxygenXML 13.
I am looking for tables in a rather large document and I want to copy those tables to the result.
what I have is:
Code:
<xsl:for-each-group select="$repoSubTree//table[@tabType='TL1Attribute']//entry/TL1Domain/DomRedir" group-by="./XRef/@Idref">
<xsl:comment>
<xsl:text>Referenced Table: </xsl:text>
<xsl:value-of select="current-grouping-key()"></xsl:value-of>
</xsl:comment>
<xsl:text>
</xsl:text>
<xsl:apply-templates select="$repoSubTree//table[./title/@Id='{current-grouping-key()}']" mode="buildAux"></xsl:apply-templates>
</xsl:for-each-group>
What I'm doing in the for-each-group is going through the document and finding every place a table is referenced, and using it's Idref to find the target table. I want to copy this table to the result.
In the result, the comments: "Referenced Table: " does show the correct set of IDs, so I'm pretty sure I got that part of the logic correct.
If I substitute one of the IDs in place of the {current-grouping-key()} in the last apply-templates, I do in fact get the table copied to the result. So I'm pretty sure that other template is also working.
What I thought would happen in this is that the ID would be substituted into the @Id='{current-grouping-key()}' for me in the for-each-group logic.
current-grouping-key() is giving me what I want, but apparently I'm not feeding it to the next template correctly.
Does anyone see what I missed?
Thanks,
- m