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 |
||
(3 intermediate revisions by the same user not shown) | |||
Line 20: | Line 20: | ||
Mail: | Mail: | ||
<xsl:value-of select="./EMail" /> | <xsl:value-of select="./EMail" /> | ||
</div> | |||
<div> | |||
Isikukood: | |||
<xsl:value-of select="./@SocialCode" /> | |||
</div> | </div> | ||
<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" /> - | |||
<!-- hoiame meeles sageduse ID --> | |||
<xsl:variable name="Freq_ID" select="./@Freq_ID" /> | |||
<!-- Käime sagedused läbi--> | |||
<xsl:for-each select="/EAMK/Freq_List/Frequencie"> | |||
<!-- Kui leidus see sagedus, kuva vastav nimi--> | |||
<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> |
Latest revision as of 23:20, 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>
<div>
Isikukood:
<xsl:value-of select="./@SocialCode" />
</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" /> -
<!-- hoiame meeles sageduse ID -->
<xsl:variable name="Freq_ID" select="./@Freq_ID" />
<!-- Käime sagedused läbi-->
<xsl:for-each select="/EAMK/Freq_List/Frequencie">
<!-- Kui leidus see sagedus, kuva vastav nimi-->
<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>