Skip to content

Instantly share code, notes, and snippets.

@ShamoX
Last active December 13, 2017 15:53
Show Gist options
  • Save ShamoX/4f00c2719c2fdb8c2324d3ca201fc309 to your computer and use it in GitHub Desktop.
Save ShamoX/4f00c2719c2fdb8c2324d3ca201fc309 to your computer and use it in GitHub Desktop.
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:end="https://www.example.org/END">
<xsl:template match="/">
<HTML>
<HEAD>
<TITLE>école des douanes</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF">
<h1><xsl:value-of select="name()"/></h1>
<xsl:apply-templates/>
</BODY>
</HTML>
</xsl:template>
<xsl:template match="*">
<xsl:comment><xsl:value-of select="name()"/></xsl:comment>
<xsl:apply-templates/>
</xsl:template>
<xsl:template match="end:etablissement">
<h1>Les personnes présentent</h1>
<ul>
<xsl:apply-templates select="end:personnels|end:etudiants"/>
</ul>
<h1>Les salles</h1>
<ul>
<xsl:apply-templates select="end:salles"/>
</ul>
</xsl:template>
<xsl:template match="end:personne">
<li><xsl:value-of select="end:nom/end:prenom"/></li>
</xsl:template>
<xsl:template match="end:salle"/>
<li>
<h2><xsl:value-of select="end:nom_salle"/></h2>
<p>étage: <xsl:value-of select="end:etage"/></p>
</li>
</xsl:template>
</xsl:stylesheet>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment