Sõitjate/mudelite ülevaade XSLT: Difference between revisions
From ICO wiki
Jump to navigationJump to search
Created page with '<source lang="xml"> <?xml version="1.0" encoding="utf-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="html" indent="yes…' |
No edit summary |
||
Line 1: | Line 1: | ||
<source lang="xml"> | <source lang="xml"><?xml version="1.0" encoding="utf-8"?> | ||
<?xml version="1.0" encoding="utf-8"?> | |||
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> | <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> | ||
<xsl:output method="html" indent="yes"/> | <xsl:output method="html" indent="yes"/> | ||
Line 23: | Line 22: | ||
<h4>Mudelid</h4> | <h4>Mudelid</h4> | ||
<ul> | <ul> | ||
<xsl:for-each select="./Models/Model"> | |||
<li> | |||
<xsl:value-of select="./Category" /> - | |||
<xsl:value-of select="./Name" /> - | |||
<xsl:value-of select="./Producer" /> - | |||
<xsl:value-of select="./Electronics" /> - | |||
<xsl:variable name="Freq_ID" select="./@ID" /> | |||
<xsl:for-each select="/EAMK/Freq_List/Frequencie"> | |||
<xsl:if test="@ID = $Freq_ID"> | |||
<xsl:value-of select="./Name" /> | <xsl:value-of select="./Name" /> | ||
</xsl:if> | |||
</xsl:for-each> | |||
</li> | |||
</xsl:for-each> | |||
</ul> | </ul> | ||
</li> | </li> |
Revision as of 22:10, 3 April 2012
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html" indent="yes"/>
<xsl:template match="/">
<html>
<head>
<title>Sõitjate nimekiri</title>
</head>
<body>
<h1>Sõitjate nimekiri</h1>
<ul>
<xsl:for-each select="/EAMK/Members/Person">
<li>
<div>
Nimi:
<xsl:value-of select="./Name" />
</div>
<div>
Mail:
<xsl:value-of select="./EMail" />
</div>
<h4>Mudelid</h4>
<ul>
<xsl:for-each select="./Models/Model">
<li>
<xsl:value-of select="./Category" /> -
<xsl:value-of select="./Name" /> -
<xsl:value-of select="./Producer" /> -
<xsl:value-of select="./Electronics" /> -
<xsl:variable name="Freq_ID" select="./@ID" />
<xsl:for-each select="/EAMK/Freq_List/Frequencie">
<xsl:if test="@ID = $Freq_ID">
<xsl:value-of select="./Name" />
</xsl:if>
</xsl:for-each>
</li>
</xsl:for-each>
</ul>
</li>
<br />
<br />
</xsl:for-each>
</ul>
</body>
</html>
</xsl:template>
</xsl:stylesheet>