I'm having trouble trying to extract a unique list of jobs from two combined lists. The two lists are in the same document but have different structures.
My plan was to build a node set combining the two lists. I would then have a single list with all elements having the same structure. Then I could select unique members to a second node set.
I used the Muenchian method of extracting unique members as described here.
Any suggestions why this is not working?
<!--create a key to use Muenchian grouping on jobs-->
<xsl:key name="keyJobID" match="Job" use="JobID"/>
<!--select unique job nodes from a node-set-->
<xsl:template name="UniqueJobNodes">
<xsl:param name="List"/>
<xsl:for-each select="$List/Job[not(generate-id() = generate-id(key('keyJobID', JobID)[1]))]">
<xsl:text>does-this-work?</xsl:text>
</xsl:for-each>
</xsl:template>
The node set I'm passing to the template seems correct. When I use '$List/Job' without the conditional I get results.
The input node-set looks like this:
<Job Primary="1">
<JobProficiency>100</JobProficiency>
<JobID>300.Supervisor</JobID>
<JobPayRate>15.4</JobPayRate>
</Job>
<Job>
<JobProficiency>50</JobProficiency>
<JobID>SUPERVISOR</JobID>
<JobPayRate>15.4</JobPayRate>
</Job>