Created
April 26, 2019 08:42
-
-
Save jashaj/cd38610a6aeaa922f3e69980bc174baf to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" | |
| xmlns:eml="urn:oasis:names:tc:evs:schema:eml" xmlns:ns2="urn:oasis:names:tc:ciq:xsdschema:xAL:2.0" | |
| xmlns:ns3="urn:oasis:names:tc:ciq:xsdschema:xNL:2.0" xmlns:ns6="http://www.kiesraad.nl/extensions" | |
| > | |
| <xsl:template match="/"> | |
| <html xml:lang="nl" lang="nl"> | |
| <head> | |
| <meta charset="UTF-8"/> | |
| <title>Kandidatenlijst | |
| <xsl:value-of select="eml:EML/eml:CandidateList/eml:Election/eml:ElectionIdentifier/eml:ElectionName"/> | |
| </title> | |
| </head> | |
| <body> | |
| <xsl:apply-templates select="eml:EML/eml:CandidateList"/> | |
| </body> | |
| </html> | |
| </xsl:template> | |
| <xsl:template match="eml:ElectionName"> | |
| <h1> | |
| <xsl:value-of select="."/> | |
| </h1> | |
| </xsl:template> | |
| <xsl:template match="eml:ElectionCategory|ns6:ElectionSubcategory|ns6:ElectionDate|ns6:NominationDate"/> | |
| <xsl:template match="eml:Affiliation"> | |
| <section> | |
| <h2>Lijst <xsl:value-of select="eml:AffiliationIdentifier/@Id"/>: | |
| <xsl:value-of select="eml:AffiliationIdentifier/eml:RegisteredName"/> | |
| </h2> | |
| <table> | |
| <thead> | |
| <tr> | |
| <th>Nr</th> | |
| <th>Voorletters</th> | |
| <th>Voornaam</th> | |
| <th>Achternaam</th> | |
| <th>Woonplaats</th> | |
| </tr> | |
| </thead> | |
| <tbody> | |
| <xsl:apply-templates select="eml:Candidate"/> | |
| </tbody> | |
| </table> | |
| </section> | |
| </xsl:template> | |
| <xsl:template match="eml:Candidate"> | |
| <tr> | |
| <td> | |
| <xsl:value-of select="eml:CandidateIdentifier/@Id"/> | |
| </td> | |
| <td> | |
| <xsl:value-of select="eml:CandidateFullName/ns3:PersonName/ns3:NameLine[@NameType='Initials']"/> | |
| </td> | |
| <td> | |
| <xsl:value-of select="eml:CandidateFullName/ns3:PersonName/ns3:FirstName"/> | |
| </td> | |
| <td> | |
| <xsl:value-of select="eml:CandidateFullName/ns3:PersonName/ns3:NamePrefix"/> | |
| <xsl:text> </xsl:text> | |
| <xsl:value-of select="eml:CandidateFullName/ns3:PersonName/ns3:LastName"/> | |
| </td> | |
| <td> | |
| <xsl:apply-templates select="eml:QualifyingAddress"/> | |
| </td> | |
| </tr> | |
| </xsl:template> | |
| <xsl:template match="eml:QualifyingAddress[ns2:Country]"> | |
| <xsl:value-of select="ns2:Country/ns2:Locality/ns2:LocalityName"/> | |
| (<xsl:value-of select="ns2:Country/ns2:CountryNameCode"/>) | |
| </xsl:template> | |
| <xsl:template match="eml:QualifyingAddress"> | |
| <xsl:value-of select="ns2:Locality/ns2:LocalityName"/> | |
| </xsl:template> | |
| </xsl:stylesheet> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment