Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: beginning xslt... filtering or xml data based on the value of a node

From: tamak <tamaker@-----.--->
To: NULL
Date: 4/6/2008 5:36:00 PM
Thanks for the replies --- I have been continuing to work on my
understanding of it all and have successfully developed the xslt to
list my records the way I want them and have the EVENTTITLE node
serving as a link using the following syntax:

pagename.asp?eID=xxxxx


Now, what I want to try to accomplish now is have a new page
(pagename.asp) that uses xslt to display the individual record from
the xml data set that has the ID that matches the eID in the
querystring.


I've tried to use <xsl:param name="eID">  and then refer to  $eID in
the xsl filter but I get no results / returns (when Im positive that
that individual ID exists in the data.

So my question now is how to dynamically generate (based on a
querystring variable) the 'ID' to use in the xsl filter where Im
looking for a particular / single record (i.e. the DETAIL view of the
record)?

MY XML:

<row>
	<ID>5732</ID>
	<EventTitle>Craftsman Spring Classic</EventTitle>
	<EventDate>3/8/2008</EventDate>
	<City>Metropolis</City>
	<EventDetail>Features original designs and work from more than 300
talented artists and craftspeople from across America. See the
creative process in action as many exhibitors demonstrate throughout
the weekend. </EventDetail>
</row>
<row>
	<ID>5733</ID>
	<EventTitle>Sweeny Todd, The Demon Barber of Fleet Street</
EventTitle>
	<EventDate>3/8/2008</EventDate>
	<City>Metropolis</City>
	<EventDetail>In this musical masterpiece, Sweeney Todd is the
unjustly exiled barber who returns to 19th century London seeking
revenge against the judge who framed him. Sophisticated, macabre,
visceral and uncompromising, Sweeney Todd also has a great sense of
fun, mixing intense drama with howlingly funny moments of dark humor.
</EventDetail>
</row>
<row>
	<ID>5734</ID>
	<EventTitle>Somethings Afoot</EventTitle>
	<EventDate>3/8/2008</EventDate>
	<City>Metropolis</City>
	<EventDetail>Join ten people who are stranded behind the door in an
isolated English country mansion and there you have it - a musical
mystery murder comedy!</EventDetail>
</row>
<row>
	<ID>5735</ID>
	<EventTitle>Fishes and Loaves</EventTitle>
	<EventDate>3/8/2008</EventDate>
	<City>Metropolis</City>
	<EventDetail>Step back in time, join the crowd on a Galilean
hillside, and watch in wonder as Jesus takes one boy's lunch, and
turns it into a feast for five thousand.  Listen and learn from the
greatest storyteller the world has ever known.</EventDetail>
</row>



MY XSLT:

<?xml version="1.0" encoding="utf-8"?><!-- DWXMLSource="http://
amaker.dns2go.com:999/leisurefun/site2/test2.asp" --><!DOCTYPE
xsl:stylesheet  [
	<!ENTITY nbsp   "&#160;">
	<!ENTITY copy   "&#169;">
	<!ENTITY reg    "&#174;">
	<!ENTITY trade  "&#8482;">
	<!ENTITY mdash  "&#8212;">
	<!ENTITY ldquo  "&#8220;">
	<!ENTITY rdquo  "&#8221;">
	<!ENTITY pound  "&#163;">
	<!ENTITY yen    "&#165;">
	<!ENTITY euro   "&#8364;">
]>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/
Transform">
<xsl:output method="html" encoding="utf-8"/>
<xsl:template match="/">
<table>
  <xsl:for-each select="export/row">
    <tr>
      <Td style="padding-bottom: 9px;">
        <a><xsl:attribute name="href">viewdetail.asp?eID=<xsl:value-of
select="ID"/></xsl:attribute><xsl:value-of select="EventTitle"/></a></
Td>
    </tr>
  </xsl:for-each>
  </table>
</xsl:template>
</xsl:stylesheet>



transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent