Help with xml

If you need help on how to use the program
Post Reply
*Guest* - Frau Holle
Posts: 46
Joined: 2002-12-14 19:24:59

Help with xml

Post by *Guest* - Frau Holle »

Hi, I want to change the transform.xml in Willspo's template. I want to show some statistics. For example the summary of the length of all movies. The Code must be something like that: x=x+length. But, on the site of w3c I've not found the right syntax.

What I've done. I've added a new box:

Code: Select all

<xsl:template match="/"> 
			<xsl:choose>
				<xsl:when test="$mode = 'normal_view'">
					<table cellpadding="0" cellspacing="0" border="0" id="contentTable" height="100%">
					<tr><td valign="top" id="leftTD">
						<div class="box">
							<div class="boxHeader">
							Suche
							</div>
							<div class="boxContent">
							Hier kannst Du nach <i>Schauspielern</i>, <i>Regisseuren</i> und <i>Filmtiteln</i> graupeln.
							<table cellpadding="0" cellspacing="0" border="0">
							<tr><td valign="top">
								<input type="text" id="searchField"/>
							</td><td valign="top">
								<a class="button" href="javascript:search(document.all.searchField.value)">Jupp</a>
							</td></tr></table>
							</div>
						</div>
						<div class="box">
							<div class="boxHeader">
								Genre
							</div>
							<div class="boxContent">
							<xsl:apply-templates select="movies" mode="create_topbar" />
							</div>
						</div>
						<div class="box">
							<div class="boxHeader">
								Graupelistiken
							</div>
							<div class="boxContent">
							<xsl:apply-templates select="movies" mode="graupelistiken" />
							
							
							
						
							</div>
						</div>
					</td><td valign="top">
						<xsl:apply-templates select="//movies" mode="normal_view" />
					</td></tr>
					</table>
				</xsl:when>
				<xsl:when test="$mode = 'info_view'">
					<xsl:apply-templates select="//movies" mode="info_view" />
				</xsl:when>
			</xsl:choose>
	</xsl:template>
And this one, for the box-content:

Code: Select all


	<xsl:template match="movies" mode="graupelistiken">
	
		Anzahl der Filme: <xsl:value-of select="filmegesamt" />
		<xsl:for-each select="length">
			z:=z+
		<xsl:value-of select="x" />
		
		
	</xsl:template>
I know my english is not really understandable, please ask if you don't understand what problem I have.
Post Reply