Hi,
Sorry this is going to be a long post but I felt it necessary to include source code.
Here's a very small portion of my xml document:
< xml version="1.0" >
<xtvd>
<stations>
<station id="10436">
<callSign>KERA</callSign>
<name>KERA</name>
<affiliate>PBS Affiliate</affiliate>
</station>
<station id="10830">
<callSign>KXAS</callSign>
<name>KXAS</name>
<affiliate>NBC Affiliate</affiliate>
</station>
<station id="16123">
<callSign>TVLAND</callSign>
<name>TV Land</name>
<affiliate>Satellite</affiliate>
</station>
<station id="11430">
<callSign>WFAA</callSign>
<name>WFAA</name>
<affiliate>ABC Affiliate</affiliate>
</station>
</stations>
<lineups>
<lineup id="TX42457:-" name="Time Warner Cable" location="Commerce" type="Cable" postalCode="75428">
<map station="10436" channel="13" />
<map station="10830" channel="5" />
<map station="11430" channel="8" />
<map station="16123" channel="44" from="2004-12-06" />
</lineup>
</lineups>
<schedules>
<schedule program="EP0019520018" station="16123" time="2006-12-18T09:00:00Z" duration="PT00H30M" tvRating="TV-G" />
<schedule program="EP0019520019" station="16123" time="2006-12-18T22:00:00Z" duration="PT00H30M" tvRating="TV-G" />
<schedule program="EP0019520020" station="16123" time="2006-12-18T16:30:00Z" duration="PT00H30M" tvRating="TV-G" />
<schedule program="EP0019730339" station="16123" time="2006-12-18T13:00:00Z" duration="PT01H00M" tvRating="TV-G" closeCaptioned="true" />
</schedules>
<programs>
<program id="EP0019520018">
<title>Green Acres</title>
<subtitle>Oh, Promise Me</subtitle>
<description>An error may mean Oliver and Lisa are not married.</description>
<showType>Series</showType>
<series>SH001952</series>
<originalAirDate>1969-03-05</originalAirDate>
</program>
<program id="EP0019520019">
<title>Green Acres</title>
<subtitle>Eb Uses His Ingenuity</subtitle>
<description>Eb involves the Douglases in a moneymaking scheme.</description>
<showType>Series</showType>
<series>SH001952</series>
<originalAirDate>1969-03-12</originalAirDate>
</program>
<program id="EP0019520020">
<title>Green Acres</title>
<subtitle>The Old Trunk</subtitle>
<description>The Douglases find a romantic tale in an old trunk.</description>
<showType>Series</showType>
<series>SH001952</series>
<originalAirDate>1969-03-19</originalAirDate>
</program>
<program id="EP0019730339">
<title>Gunsmoke</title>
<subtitle>Tatum</subtitle>
<description>Bitter townspeople don't want an elderly gunfighter buried next to his wife in their cemetery.</description>
<showType>Series</showType>
<series>SH001973</series>
<originalAirDate>1972-11-13</originalAirDate>
</program>
</programs>
</xtvd>
And here's the XSLT code I wrote:
<
xml version="1.0" encoding="UTF-8" ><
xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"><
xsl:key name="progid" match="programs/program" use="@id" /><
xsl:key name="schprogid" match="schedules/schedule" use="@program" /><
xsl:key name="lineupstationid" match="lineups/lineup/map" use="@station"/><
xsl:key name="stationid" match="stations/station" use="@id"/><
xsl:template match="/"><
xsl:for-each select="//programs/program"><
br></br> <br></br>Title:
<xsl:value-of select="title[.='Green Acres']"/><
br></br>SubTitle:
<xsl:value-of select="subtitle" />Description:
<xsl:value-of select="description" />Series:
<xsl:value-of select="series" />RunTime:
<xsl:value-of select="runTime" />OriginalAirDate:
<xsl:value-of select="originalAirDate" /><
xsl:for-each select="key('schprogid', @id)">Time:
<xsl:value-of select="@time"/>Duration:
<xsl:value-of select="@duration"/>Repeat:
<xsl:value-of select="@repeat"/>TVRating:
<xsl:value-of select="@tvRating"/><
xsl:for-each select="key('lineupstationid', @station)">Channel:
<xsl:value-of select="@channel"/></
xsl:for-each><
xsl:for-each select="key('stationid', @station)">CallSign:
<xsl:value-of select="callSign"/>Name:
<xsl:value-of select="name"/>Affiliate:
<xsl:value-of select="affiliate"/></
xsl:for-each></
xsl:for-each></
xsl:for-each></
xsl:template></
xsl:stylesheet>What happens is the html document I'm producing with XslCompiledTransform in my C# program displays each of the "Green Acres" with their detail information, then displays the "Gunsmoke" episode without a title.
What I want to do is use XPath select for my favorite shows and list the detailed information about each. How do I remove the "Gunsmoke" data from the output How do I search for a list of favorite program titles