I have an .xml file containing two sets of information that I want to match up to each other based on their ID value (1.2). For example, this snippet.
<rule id="1.2">
<checker id="checker.id">
<description locale="en">description</description>
</checker>
</rule>
<rule id="1.2">
<checker>
<category locale="en">Advisory</category>
<decidable locale="en">Yes</decidable>
</checker>
</rule>
I have a .xsl for each rule, add the values to a table entry
<row>
<entry>
<xsl:value-of select="@id"/>
</entry>
<entry>
<xsl:for-each select="checker">
<xsl:value-of select="category[@locale=$locale]"/>
</xsl:for-each>
</entry>
<entry>
<xsl:for-each select="checker">
<xsl:value-of select="decidable[@locale=$locale]"/>
</xsl:for-each>
</entry>
<entry>
<xsl:for-each select="checker">
<p>
<codeph>
<xsl:value-of select="@id"/></codeph><xsl:text> </xsl:text>
<xsl:value-of select="description[@locale=$locale]"/>
</p>
</xsl:for-each>
</entry>
</row>
The current result gives me this, but it has created two separate rows even though the ID is the same. What can I do to have the information with the same ID be in the same row?
<row>
<entry>1.2</entry>
<entry>Advisory</entry>
<entry>Yes</entry>
<entry>
<p>
<codeph/></p>
</entry>
</row>
<row>
<entry>1.2</entry>
<entry/>
<entry/>
<entry>
<p>
<codeph>checker.id</codeph>description</p>
</entry>
</row>
Desired outcome:
<row>
<entry>1.2</entry>
<entry>Advisory</entry>
<entry>Yes</entry>
<entry>
<p><codeph>checker.id</codeph>description</p>
</entry>
</row>