File: isotabexa1.xsl

package info (click to toggle)
texlive-doc 2007.dfsg.2-1
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 129,872 kB
  • ctags: 3,330
  • sloc: xml: 23,147; perl: 8,370; makefile: 843; sh: 352; lisp: 276; java: 159; python: 97; sed: 4
file content (20 lines) | stat: -rw-r--r-- 640 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<?xml version='1.0' encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:output method="text" encoding="ISO-8859-1"/>

<xsl:template match="/countries">
 <xsl:for-each select="country">
  <xsl:sort select="@capital"/>
  <xsl:if test="(@capital != '-') and (@capital != ' ')">
   <xsl:value-of select="@capital"/>
   <xsl:text> is the capital of </xsl:text>
   <xsl:value-of select="@shortname"/>
   <xsl:text> (ISO-code </xsl:text>
   <xsl:value-of select="@isocountry"/>
   <xsl:text>)&#xA;</xsl:text><!-- new line -->
  </xsl:if>
 </xsl:for-each>
</xsl:template>

</xsl:stylesheet>