Hi,
this is a follow-up to this thread.
I've tried a load of different things but I can't get any to work, and I feel like I'm missing something.
I need to sort my entries by the venueID. I don't need to do it dynamically (at this stage anyway). I need to be able to alter the xsl to say 'show only entries with 'this' venueID.
Here's the XML (simplified) from the previous thread:
and here's the code that JontyMC provided:
I saw AND being used in another thread, but it was a different situation and I could get it to work.
Any help would be greatly appreciated.
Thanks in advance.
this is a follow-up to this thread.
I've tried a load of different things but I can't get any to work, and I feel like I'm missing something.
I need to sort my entries by the venueID. I don't need to do it dynamically (at this stage anyway). I need to be able to alter the xsl to say 'show only entries with 'this' venueID.
Here's the XML (simplified) from the previous thread:
Code:
<listing>
<titleList>
<title titleID="someID">
<titleName>Land Of the Dead</titleName>
</title>
<title... etc etc
</titleList>
<eventList>
<event titleID="txsahara" [COLOR=#ff0000]venueID="vxromste"[/color]
>
<originalTimes>Progs 11.15am 2.15pm 5.15pm</originalTimes>
</event>
<event... etc etc
</eventList>
</listing>
and here's the code that JontyMC provided:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="[URL unfurl="true"]http://www.w3.org/1999/XSL/Transform">[/URL]
<xsl:output method="xml" indent="yes"/>
<xsl:template match="/">
<xsl:apply-templates select="listing/eventList"/>
</xsl:template>
<xsl:template match="eventList">
<ul>
<xsl:apply-templates select="event"/>
</ul>
</xsl:template>
<xsl:template match="event">
<li>
<xsl:value-of select="../../titleList/title[@titleID = current()/@titleID]/titleName"/> - <xsl:value-of select="originalTimes"/>
</li>
</xsl:template>
</xsl:stylesheet>
I saw AND being used in another thread, but it was a different situation and I could get it to work.
Any help would be greatly appreciated.
Thanks in advance.