My xml is a s follows...
Code:
<careers dcr="/xxxx/Careers/data/ij-NewYorkHeadTesting">
<location>New York</location>
<jobtitle>New York Head Of Testing</jobtitle>
<departmentoverview>AAAAAAA010AAAAAAA020AAAAAAA030AAAAAAA040AAAAAAA050AAAAAAA060AAAAAAA070AAAAAAA080AAAAAAA090AAAAAAA100AAAAAAA110AAAAAAA120AAAAAAA130AAAAAAA140AAAAAAA150AAAAAAA160AAAAAAA170AAAAAAA180AAAAAAA190AAAAAAA200AAAAAAA210AAAAAAA220AAAAAAA230AAAAAAA240AAAAAAA250AAAAAAA260AAAAAAA270AAAAAAA280AAAAAAA290AAAAAAA300AAAAAAA310AAAAAAA320AAAAAAA330AAAAAAA340AAAAAAA350AAAAAAA360AAAAAAA370AAAAAAA380AAAAAAA390AAAAAAA400AAAAAAA410AAAAAAA420AAAAAAA430AAAAAAA440AAAAAAA450AAAAAAA460AAAAAAA470AAAAAAA480AAAAAAA490AAAAAAA500</departmentoverview>
<positionsummary>AAAAAAA010AAAAAAA020AAAAAAA030AAAAAAA040AAAAAAA050AAAAAAA060AAAAAAA070AAAAAAA080AAAAAAA090AAAAAAA100AAAAAAA110AAAAAAA120AAAAAAA130AAAAAAA140AAAAAAA150AAAAAAA160AAAAAAA170AAAAAAA180AAAAAAA190AAAAAAA200AAAAAAA210AAAAAAA220AAAAAAA230AAAAAAA240AAAAAAA250AAAAAAA260AAAAAAA270AAAAAAA280AAAAAAA290AAAAAAA300AAAAAAA310AAAAAAA320AAAAAAA330AAAAAAA340AAAAAAA350AAAAAAA360AAAAAAA370AAAAAAA380AAAAAAA390AAAAAAA400AAAAAAA410AAAAAAA420AAAAAAA430AAAAAAA440AAAAAAA450AAAAAAA460AAAAAAA470AAAAAAA480AAAAAAA490AAAAAAA500</positionsummary>
- <businesscompetencies>
- <dutiesandresponsibililites>
<bulletpt>AAAAAAA010AAAAAAA020AAAAAAA030AAAAAAA040AAAAAAA050</bulletpt>
</dutiesandresponsibililites>
- <educationandexperience>
<bulletpt>AAAAAAA010AAAAAAA020AAAAAAA030AAAAAAA040AAAAAAA050</bulletpt>
</educationandexperience>
- <commercialawareness>
<bulletpt>AAAAAAA010AAAAAAA020AAAAAAA030AAAAAAA040AAAAAAA050</bulletpt>
</commercialawareness>
- <managementrequirements>
<bulletpt>AAAAAAA010AAAAAAA020AAAAAAA030AAAAAAA040AAAAAAA050</bulletpt>
</managementrequirements>
</businesscompetencies>
- <personalcompetencies>
- <personalimpact>
<bulletpt>AAAAAAA010AAAAAAA020AAAAAAA030AAAAAAA040AAAAAAA050</bulletpt>
</personalimpact>
- <communication>
<bulletpt>AAAAAAA010AAAAAAA020AAAAAAA030AAAAAAA040AAAAAAA050</bulletpt>
</communication>
- <teamwork>
<bulletpt>AAAAAAA010AAAAAAA020AAAAAAA030AAAAAAA040AAAAAAA050</bulletpt>
</teamwork>
</personalcompetencies>
<active>Yes</active>
</careers>
I am using the following xsl to display career titles (sorted) by location which
Code:
<xsl:for-each select="$dcr[generate-id() = generate-id(key('by-location', location)[1])]">
<xsl:sort select="location"/>
<tr valign="top">
<td valign="top">
<xsl:if test="active = 'Yes'">
<b><a name="{location}"><xsl:value-of select="location"/></a></b><br/>
<xsl:for-each select="key('by-location',location)/jobtitle">
<xsl:sort select="."/>
<a href="$PAGE_LINK[information/about/Careers/careers-detail]dcr={$dcr/@dcr}"><xsl:value-of select="."/></a><br/>
</xsl:for-each>
</xsl:if>
</td>
</tr>
</xsl:for-each>
Essentially my problem, is that now that I have the nested for each, which works for the sorting of the job titles within the location, the @dcr only picks up the 1st dcr.
What do I have to do/add to make
Code:
<a href="$PAGE_LINK[information/about/Careers/careers-detail]dcr={@dcr}"><xsl:value-of select="jobtitle"/></a><br/>
work within the 2nd <xsl:for each />. It works within the first <xsl:for-each/>, but that is not what I need.