Hi everyone..
I have a menu with three industries and an "active" option:
<ul>
<li id="p_active"><a href="active.xml">Active</a></li>
<li id="p_education"><a href="education.xml">Education</a></li>
<li id="p_energy"><a href="energy.xml">Energy</a></li>
<li id="p_services"><a href="services.xml">Services</a>
</li>
</ul>
There are a number of companies within each industry, additionally, each of them is either "Active" or "Inactive".
Upon going to a company's page, there are BACK and NEXT buttons, which will navigate through the master list of companies, to the respective adjacent company within that industry.
(i.e. Company ABC is in the Education industry, so on their page, Back and Next will go to the other companies within the Education industry). I have accomplished this in XSLT:
<xsl:choose>
<xsl:when test="(company[@ind='Education'])">
<xsl:value-of select="document('invest-port.xml')/portfolio/company[name=$name]/following-sibling::company[@ind='Education'][1]/link"/>
</xsl:when>
<xsl:when test="(company[@ind='Energy'])">
<xsl:value-of select="document('invest-port.xml')/portfolio/company[name=$name]/following-sibling::company[@ind='Energy'][1]/link"/>
</xsl:when>
</xsl:choose>
Example company XML file:
<fragment>
<company ind="Education" stat="Active">Company ABC</company>
<hq>Boston, MA</hq>
<desc>This company makes products for schools</desc>
</fragment>
This works, with the Industry as the default sort key, based on the code I've written. My problem is this: I want to make it so when the user clicks "ACTIVE" in the menu, the Back and Next buttons will navigate through the @status="Active" attributes, INSTEAD of by Industry.
What is the best way to approach this? I've looked at a lot of different solutions, but I can't seem to figure out the best way of doing this...Thanks!