Re: [xsl] two nodes are iterating

Subject: Re: [xsl] two nodes are iterating
From: Joerg Heinicke <joerg.heinicke@xxxxxx>
Date: Tue, 17 Dec 2002 01:23:25 +0100
How can we help if you don't show us the XML and if you don't say what in which way does not work (expected output vs. output you get at the moment)? At least there seems not to be an obvious error.

Joerg

NIENKE, Bill P. - ACCOR-NA wrote:
Hi,
I'm missing something simple with this transformation and I could use
another set of eyes to look it over.

Almost everything works as it should, except the geo:name and the geo:url
nodes aren't iterating as they should.

Any help would be greatly appreciated!

<?xml version='1.0' encoding='ISO-8859-1'?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
 xmlns:geo="http://www.topografix.com/GPX/1/0";>
<xsl:output method="html" version="1.0" encoding="UTF-8"
omit-xml-declaration="no" indent="no" media-type="text/html"/>
<xsl:param name="sort_letter"/>

<xsl:template match="/">
    <html>
       <head><title>Cache DB</title></head>
	   <link rel="STYLESHEET" type="text/css"
href="/includes/style_ael.css"/>
   <body style="body" background="">
	<form action="cache_vote_process.asp" method="post" name="theForm"
enctype="application/x-www-form-urlencoded">
	<table width="600" class="content" align="center" cellspacing="5"
bgcolor="#ffffff">
				<tr>
					<td align="center" colspan="2">

		<b>DFW Cache List </b><br></br>		
					</td>
				</tr>	
				<tr>
					<td align="center" colspan="2">

		<h3><a href="cache_db3.asp?sort_letter=A">A</a> | <a
href="cache_db3.asp?sort_letter=B">B</a> | <a
href="cache_db3.asp?sort_letter=C">C</a> | <a
href="cache_db3.asp?sort_letter=D">D</a> | <a
href="cache_db3.asp?sort_letter=E">E</a> | <a
href="cache_db3.asp?sort_letter=F">F</a> | <a
href="cache_db3.asp?sort_letter=G">G</a> | <a
href="cache_db3.asp?sort_letter=H">H</a> | <a
href="cache_db3.asp?sort_letter=I">I</a> | <a
href="cache_db3.asp?sort_letter=J">J</a> | <a
href="cache_db3.asp?sort_letter=K">K</a> | <a
href="cache_db3.asp?sort_letter=L">L</a> | <a
href="cache_db3.asp?sort_letter=M">M</a> | <a
href="cache_db3.asp?sort_letter=N">N</a> | <a
href="cache_db3.asp?sort_letter=O">O</a> | <a
href="cache_db3.asp?sort_letter=P">P</a> | <a
href="cache_db3.asp?sort_letter=Q">Q</a> | <a
href="cache_db3.asp?sort_letter=R">R</a> | <a
href="cache_db3.asp?sort_letter=S">S</a> | <a
href="cache_db3.asp?sort_letter=T">T</a> | <a
href="cache_db3.asp?sort_letter=U">U</a> | <a
href="cache_db3.asp?sort_letter=V">V</a> | <a
href="cache_db3.asp?sort_letter=W">W</a> | <a
href="cache_db3.asp?sort_letter=X">X</a> | <a
href="cache_db3.asp?sort_letter=Y">Y</a> | <a
href="cache_db3.asp?sort_letter=Z">Z</a></h3>

					</td>
				</tr>	
				<tr>	
  					<td>
					<xsl:apply-templates
select="/geo:gpx/geo:wpt/geo:desc">
						<xsl:sort select="geo:desc"
data-type="text" order="ascending"/>
					</xsl:apply-templates>
				   </td>
				</tr>
				<tr>
					<td colspan="2" align="center">
					<input type="submit" value="Vote!"/>
		 			</td>
				</tr>		
			  </table>
			  </form>
    </body>
    </html>
</xsl:template>
 <xsl:template match="/geo:gpx/geo:wpt/geo:desc">
<xsl:if test="starts-with(text(),$sort_letter)">
1st:<input type="radio" name="vote-1">
	<xsl:attribute name="value">
		<xsl:value-of select="."/>
	</xsl:attribute>
 </input>
2nd:<input type="radio" name="vote-2">
	<xsl:attribute name="value">
		<xsl:value-of select="."/>
	</xsl:attribute>
 </input>	
3rd:<input type="radio" name="vote-3">
	<xsl:attribute name="value">
		<xsl:value-of select="."/>
	</xsl:attribute>
 </input>
<a><xsl:attribute name="href"><xsl:value-of
select="/geo:gpx/geo:wpt/geo:url"/></xsl:attribute><xsl:value-of
select="."/></a> - <xsl:value-of
select="/geo:gpx/geo:wpt/geo:name"/><br></br>
</xsl:if>	
</xsl:template>
</xsl:stylesheet>


Regards, William Nienke


XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list


Current Thread