Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries >Thread Prev - Re: Beginner working around variables [Thread Next] Re: Beginner working around variablesTo: NULL Date: 8/3/2007 12:09:00 PM
Oh, I actually meant to have a sequence number in the table.
==========
I got the header data with the following:
<?xml version='1.0' encoding='utf-8'?>
<xsl:stylesheet xmlns:xsl='http://www.w3.org/1999/XSL/Transform'
version='1.0'>
<xsl:variable name="Sequence"> select='"1"'></xsl:variable>
<xsl:variable name="MyName" select='"1Two"'></xsl:variable>
<xsl:variable name="MyArtist"> select='"1Four"'></xsl:variable>
<xsl:variable name="MyRating"> select='"1Five"'></xsl:variable>
<xsl:variable name="MyStars"> select='"*****"'></xsl:variable>
<xsl:comment> Insert the following into copy of iTunes Music
Library.xml
<?xml-stylesheet href="myiTunes.xsl" type="text/xsl"?>
</xsl:comment>
<xsl:output method='html' indent='no'/>
<xsl:param name="title">Brazee's iTunes Library</xsl:param>
<xsl:template match='/'>
<html><body>
<h2>My iTune Collection
<xsl:apply-templates
select='/plist/dict/child::key[position()<8]'/>
</h2>
<br/><br/><xsl:apply-templates select='/plist/dict/dict//dict'/>
</body></html>
</xsl:template>
...
</xsl:template>
<xsl:template match='key'>
<xsl:call-template name='showNextSiblingVal'>
<xsl:with-param name='firstSiblingVal' select='.'/>
</xsl:call-template>
</xsl:template>
<xsl:template name='showNextSiblingVal'>
<xsl:param name='firstSiblingVal'/>
<xsl:if test='. = $firstSiblingVal'>
<br/><xsl:value-of select='.'/>: <xsl:value-of
select='following-sibling::*'/>
</xsl:if>
</xsl:template>
</xsl:stylesheet>
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
