Sert à la page
dessins.php
Liste source :
objets.xml
transfo_dessin_html.xsl
<!-- Nom de fichier : transfo_dessin_html.xsl --> <!-- Creation : Milib le 21/09/2018 --> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ns="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://web.resource.org/cc/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" > <xsl:output method="xml" encoding="UTF-8" /> <xsl:template match="/"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> <meta name="description" content="dessin svg"/> </head> <body> <xsl:for-each select="dessins/image"> <!-- cadre de l'image --> <div id="{@ref}" name="{@ref}" title="{@ref}" style="border:1px dotted black;"> <svg id="dessin_{@ref}" viewBox="0 0 1920 1080"> <!-- format de l'image --> <xsl:call-template name="quadrillage_cahier"/> <xsl:apply-templates select="objet"> </xsl:apply-templates> </svg> </div> </xsl:for-each> </body> </html> </xsl:template> <!-- Ecriture du dessin --> <xsl:template match="objet"> <xsl:variable name="nom_elem_image"><xsl:value-of select="@nom"/></xsl:variable> <!-- texte commentaire de l'objet --> <text x="{@x}" y="{@y}" style="fill:#101010;-inkscape-font-specification:Arial;font-family:Arial;font-weight:normal;font-style:normal;font-stretch:normal;font-variant:normal;font-size:80px;" ><xsl:value-of select="@comm"/></text> <!-- objet image, avec ses transformations de translation et ratio de taille --> <g id="{@name}" transform="translate({@x},{@y})"> <g transform="matrix({@ratio},0,0,{@ratio},0,0)"> <xsl:choose> <xsl:when test="$nom_elem_image='alsacien'"><xsl:call-template name="alsacien"/></xsl:when> <xsl:when test="$nom_elem_image='alsacienne'"><xsl:call-template name="alsacienne"/></xsl:when> <xsl:when test="$nom_elem_image='alsace'"><xsl:call-template name="alsace"/></xsl:when> <xsl:when test="$nom_elem_image='mulhouse_alsace'"><xsl:call-template name="mulhouse_alsace"/></xsl:when> <xsl:when test="$nom_elem_image='roue_mulhouse'"><xsl:call-template name="roue_mulhouse"/></xsl:when> <xsl:when test="$nom_elem_image='chien'"><xsl:call-template name="chien"/></xsl:when> <xsl:when test="$nom_elem_image='chat'"><xsl:call-template name="chat"/></xsl:when> <xsl:when test="$nom_elem_image='chat_lait'"><xsl:call-template name="chat_lait"/></xsl:when> <xsl:when test="$nom_elem_image='lapin'"><xsl:call-template name="lapin"/></xsl:when> <xsl:when test="$nom_elem_image='zero'"><xsl:call-template name="zero"/></xsl:when> <xsl:when test="$nom_elem_image='un'"><xsl:call-template name="un"/></xsl:when> <xsl:when test="$nom_elem_image='deux'"><xsl:call-template name="deux"/></xsl:when> <xsl:when test="$nom_elem_image='trois'"><xsl:call-template name="trois"/></xsl:when> <xsl:when test="$nom_elem_image='quatre'"><xsl:call-template name="quatre"/></xsl:when> <xsl:when test="$nom_elem_image='cinq'"><xsl:call-template name="cinq"/></xsl:when> <xsl:when test="$nom_elem_image='six'"><xsl:call-template name="six"/></xsl:when> <xsl:when test="$nom_elem_image='sept'"><xsl:call-template name="sept"/></xsl:when> <xsl:when test="$nom_elem_image='huit'"><xsl:call-template name="huit"/></xsl:when> <xsl:when test="$nom_elem_image='neuf'"><xsl:call-template name="neuf"/></xsl:when> <xsl:when test="$nom_elem_image='dix'"><xsl:call-template name="dix"/></xsl:when> </xsl:choose> </g> </g> </xsl:template> <!-- dessin du quadrillage de fond de l'image --> <xsl:template name="quadrillage_cahier"> <g id="gCahier"> <rect inkscape:export-filename="F:\XML_SVG\cahier_seyes.png" inkscape:export-ydpi="90" inkscape:export-xdpi="90" y="0" x="0" height="1080" width="1920" id="rectFondBlanc" style="fill:#ffffff;fill-opacity:1;stroke:none" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line_marge" style="stroke:#ffc0cb;stroke-width:2" y2="1080" x2="400" y1="0" x1="400" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line_verticale1" style="stroke:#b0c4de;stroke-width:2" y2="1080" x2="500" y1="0" x1="500" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line_verticale2" style="stroke:#b0c4de;stroke-width:2" y2="1080" x2="600" y1="0" x1="600" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line_verticale3" style="stroke:#b0c4de;stroke-width:2" y2="1080" x2="700" y1="0" x1="700" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line_verticale4" style="stroke:#b0c4de;stroke-width:2" y2="1080" x2="800" y1="0" x1="800" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line_verticale5" style="stroke:#b0c4de;stroke-width:2" y2="1080" x2="900" y1="0" x1="900" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line_verticale6" style="stroke:#b0c4de;stroke-width:2" y2="1080" x2="1000" y1="0" x1="1000" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line_verticale7" style="stroke:#b0c4de;stroke-width:2" y2="1080" x2="1100" y1="0" x1="1100" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line_verticale8" style="stroke:#b0c4de;stroke-width:2" y2="1080" x2="1200" y1="0" x1="1200" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line_verticale9" style="stroke:#b0c4de;stroke-width:2" y2="1080" x2="1300" y1="0" x1="1300" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line_verticale10" style="stroke:#b0c4de;stroke-width:2" y2="1080" x2="1400" y1="0" x1="1400" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line_verticale11" style="stroke:#b0c4de;stroke-width:2" y2="1080" x2="1500" y1="0" x1="1500" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line_verticale12" style="stroke:#b0c4de;stroke-width:2" y2="1080" x2="1600" y1="0" x1="1600" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line_verticale13" style="stroke:#b0c4de;stroke-width:2" y2="1080" x2="1700" y1="0" x1="1700" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line_verticale14" style="stroke:#b0c4de;stroke-width:2" y2="1080" x2="1800" y1="0" x1="1800" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line_verticale15" style="stroke:#b0c4de;stroke-width:2" y2="1080" x2="1900" y1="0" x1="1900" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line_inter1_1" style="stroke:#b0c4de;stroke-width:1" y2="25" x2="1920" y1="25" x1="0" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line_inter1_2" style="stroke:#b0c4de;stroke-width:1" y2="50" x2="1920" y1="50" x1="0" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line_inter1_3" style="stroke:#b0c4de;stroke-width:1" y2="75" x2="1920" y1="75" x1="0" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line1" style="stroke:#9370db;stroke-width:2" y2="100" x2="1920" y1="100" x1="0" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line_inter2_1" style="stroke:#b0c4de;stroke-width:1" y2="125" x2="1920" y1="125" x1="0" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line_inter2_2" style="stroke:#b0c4de;stroke-width:1" y2="150" x2="1920" y1="150" x1="0" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line_inter2_3" style="stroke:#b0c4de;stroke-width:1" y2="175" x2="1920" y1="175" x1="0" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line2" style="stroke:#9370db;stroke-width:2" y2="200" x2="1920" y1="200" x1="0" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line_inter3_1" style="stroke:#b0c4de;stroke-width:1" y2="225" x2="1920" y1="225" x1="0" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line_inter3_2" style="stroke:#b0c4de;stroke-width:1" y2="250" x2="1920" y1="250" x1="0" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line_inter3_3" style="stroke:#b0c4de;stroke-width:1" y2="275" x2="1920" y1="275" x1="0" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line3" style="stroke:#9370db;stroke-width:2" y2="300" x2="1920" y1="300" x1="0" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line_inter4_1" style="stroke:#b0c4de;stroke-width:1" y2="325" x2="1920" y1="325" x1="0" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line_inter4_2" style="stroke:#b0c4de;stroke-width:1" y2="350" x2="1920" y1="350" x1="0" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line_inter4_3" style="stroke:#b0c4de;stroke-width:1" y2="375" x2="1920" y1="375" x1="0" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line4" style="stroke:#9370db;stroke-width:2" y2="400" x2="1920" y1="400" x1="0" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line_inter5_1" style="stroke:#b0c4de;stroke-width:1" y2="425" x2="1920" y1="425" x1="0" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line_inter5_2" style="stroke:#b0c4de;stroke-width:1" y2="450" x2="1920" y1="450" x1="0" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line_inter5_3" style="stroke:#b0c4de;stroke-width:1" y2="475" x2="1920" y1="475" x1="0" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line5" style="stroke:#9370db;stroke-width:2" y2="500" x2="1920" y1="500" x1="0" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line_inter6_1" style="stroke:#b0c4de;stroke-width:1" y2="525" x2="1920" y1="525" x1="0" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line_inter6_2" style="stroke:#b0c4de;stroke-width:1" y2="550" x2="1920" y1="550" x1="0" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line_inter6_3" style="stroke:#b0c4de;stroke-width:1" y2="575" x2="1920" y1="575" x1="0" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line6" style="stroke:#9370db;stroke-width:2" y2="600" x2="1920" y1="600" x1="0" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line_inter7_1" style="stroke:#b0c4de;stroke-width:1" y2="625" x2="1920" y1="625" x1="0" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line_inter7_2" style="stroke:#b0c4de;stroke-width:1" y2="650" x2="1920" y1="650" x1="0" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line_inter7_3" style="stroke:#b0c4de;stroke-width:1" y2="675" x2="1920" y1="675" x1="0" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line7" style="stroke:#9370db;stroke-width:2" y2="700" x2="1920" y1="700" x1="0" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line_inter8_1" style="stroke:#b0c4de;stroke-width:1" y2="725" x2="1920" y1="725" x1="0" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line_inter8_2" style="stroke:#b0c4de;stroke-width:1" y2="750" x2="1920" y1="750" x1="0" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line_inter8_3" style="stroke:#b0c4de;stroke-width:1" y2="775" x2="1920" y1="775" x1="0" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line8" style="stroke:#9370db;stroke-width:2" y2="800" x2="1920" y1="800" x1="0" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line_inter9_1" style="stroke:#b0c4de;stroke-width:1" y2="825" x2="1920" y1="825" x1="0" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line_inter9_2" style="stroke:#b0c4de;stroke-width:1" y2="850" x2="1920" y1="850" x1="0" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line_inter9_3" style="stroke:#b0c4de;stroke-width:1" y2="875" x2="1920" y1="875" x1="1" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line9" style="stroke:#9370db;stroke-width:2" y2="900" x2="1920" y1="900" x1="0" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line_inter10_1" style="stroke:#b0c4de;stroke-width:1" y2="925" x2="1920" y1="925" x1="0" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line_inter10_2" style="stroke:#b0c4de;stroke-width:1" y2="950" x2="1920" y1="950" x1="0" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line_inter10_3" style="stroke:#b0c4de;stroke-width:1" y2="975" x2="1920" y1="975" x1="1" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line10" style="stroke:#9370db;stroke-width:2" y2="1000" x2="1920" y1="1000" x1="0" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line_inter11_1" style="stroke:#b0c4de;stroke-width:1" y2="1025" x2="1920" y1="1025" x1="0" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line_inter11_2" style="stroke:#b0c4de;stroke-width:1" y2="1050" x2="1920" y1="1050" x1="0" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line_inter11_3" style="stroke:#b0c4de;stroke-width:1" y2="1075" x2="1920" y1="1075" x1="1" /> </g> </xsl:template> <xsl:template name="alsacien">
</xsl:template> <xsl:template name="alsacienne">
</xsl:template> <xsl:template name="alsace">
</xsl:template> <xsl:template name="mulhouse_alsace">
</xsl:template> <xsl:template name="roue_mulhouse">
</xsl:template> <xsl:template name="chien">
</xsl:template> <xsl:template name="chat">
</xsl:template> <xsl:template name="chat_lait">
</xsl:template> <xsl:template name="lapin">
</xsl:template> <xsl:template name="zero">
</xsl:template> <xsl:template name="un">
</xsl:template> <xsl:template name="deux">
</xsl:template> <xsl:template name="trois">
</xsl:template> <xsl:template name="quatre">
</xsl:template> <xsl:template name="cinq">
</xsl:template> <xsl:template name="six">
</xsl:template> <xsl:template name="sept">
</xsl:template> <xsl:template name="huit">
</xsl:template> <xsl:template name="neuf">
</xsl:template> <xsl:template name="dix">
</xsl:template> </xsl:stylesheet>
Montrer le détail du traitement
Déployer tous les contenus
>
Montrer le détail
génération de la transformation effectuant le construction d'images SVG, par la transformation
transfo_
formate_objets
_xml.xsl
?
↓ XSL
<?xml version ="1.0" encoding="UTF-8"?> <!-- Nom de fichier : transfo_formate_objets_xml.xsl --> <!-- Creation : Milib le 21/09/2018 --> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" > <xsl:output method="xml" encoding="UTF-8" /> <xsl:template match="/" > <xsl:text> <![CDATA[ <!-- Nom de fichier : transfo_dessin_html.xsl --> <!-- Creation : Milib le 21/09/2018 --> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ns="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://web.resource.org/cc/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" > <xsl:output method="xml" encoding="UTF-8" /> <xsl:template match="/"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> <meta name="description" content="dessin svg"/> </head> <body> <xsl:for-each select="dessins/image"> <!-- cadre de l'image --> <div id="{@ref}" name="{@ref}" title="{@ref}" style="border:1px dotted black;"> <svg id="dessin_{@ref}" viewBox="0 0 1920 1080"> <!-- format de l'image --> <xsl:call-template name="quadrillage_cahier"/> <xsl:apply-templates select="objet"> </xsl:apply-templates> </svg> </div> </xsl:for-each> </body> </html> </xsl:template> <!-- Ecriture du dessin --> <xsl:template match="objet"> <xsl:variable name="nom_elem_image"><xsl:value-of select="@nom"/></xsl:variable> <!-- texte commentaire de l'objet --> <text x="{@x}" y="{@y}" style="fill:#101010;-inkscape-font-specification:Arial;font-family:Arial;font-weight:normal;font-style:normal;font-stretch:normal;font-variant:normal;font-size:80px;" ><xsl:value-of select="@comm"/></text> <!-- objet image, avec ses transformations de translation et ratio de taille --> <g id="{@name}" transform="translate({@x},{@y})"> <g transform="matrix({@ratio},0,0,{@ratio},0,0)"> <xsl:choose> ]]> </xsl:text> <xsl:for-each select="objets/objet"> <xsl:text><![CDATA[<xsl:when test="$nom_elem_image=']]></xsl:text><xsl:value-of select="@nom_obj"/><xsl:text><![CDATA['"><xsl:call-template name="]]></xsl:text><xsl:value-of select="@nom_obj"/><xsl:text><![CDATA["/></xsl:when>]]> </xsl:text> </xsl:for-each> <xsl:text> <![CDATA[ </xsl:choose> </g> </g> </xsl:template> <!-- dessin du quadrillage de fond de l'image --> <xsl:template name="quadrillage_cahier"> <g id="gCahier"> <rect inkscape:export-filename="F:\XML_SVG\cahier_seyes.png" inkscape:export-ydpi="90" inkscape:export-xdpi="90" y="0" x="0" height="1080" width="1920" id="rectFondBlanc" style="fill:#ffffff;fill-opacity:1;stroke:none" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line_marge" style="stroke:#ffc0cb;stroke-width:2" y2="1080" x2="400" y1="0" x1="400" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line_verticale1" style="stroke:#b0c4de;stroke-width:2" y2="1080" x2="500" y1="0" x1="500" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line_verticale2" style="stroke:#b0c4de;stroke-width:2" y2="1080" x2="600" y1="0" x1="600" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line_verticale3" style="stroke:#b0c4de;stroke-width:2" y2="1080" x2="700" y1="0" x1="700" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line_verticale4" style="stroke:#b0c4de;stroke-width:2" y2="1080" x2="800" y1="0" x1="800" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line_verticale5" style="stroke:#b0c4de;stroke-width:2" y2="1080" x2="900" y1="0" x1="900" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line_verticale6" style="stroke:#b0c4de;stroke-width:2" y2="1080" x2="1000" y1="0" x1="1000" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line_verticale7" style="stroke:#b0c4de;stroke-width:2" y2="1080" x2="1100" y1="0" x1="1100" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line_verticale8" style="stroke:#b0c4de;stroke-width:2" y2="1080" x2="1200" y1="0" x1="1200" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line_verticale9" style="stroke:#b0c4de;stroke-width:2" y2="1080" x2="1300" y1="0" x1="1300" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line_verticale10" style="stroke:#b0c4de;stroke-width:2" y2="1080" x2="1400" y1="0" x1="1400" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line_verticale11" style="stroke:#b0c4de;stroke-width:2" y2="1080" x2="1500" y1="0" x1="1500" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line_verticale12" style="stroke:#b0c4de;stroke-width:2" y2="1080" x2="1600" y1="0" x1="1600" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line_verticale13" style="stroke:#b0c4de;stroke-width:2" y2="1080" x2="1700" y1="0" x1="1700" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line_verticale14" style="stroke:#b0c4de;stroke-width:2" y2="1080" x2="1800" y1="0" x1="1800" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line_verticale15" style="stroke:#b0c4de;stroke-width:2" y2="1080" x2="1900" y1="0" x1="1900" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line_inter1_1" style="stroke:#b0c4de;stroke-width:1" y2="25" x2="1920" y1="25" x1="0" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line_inter1_2" style="stroke:#b0c4de;stroke-width:1" y2="50" x2="1920" y1="50" x1="0" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line_inter1_3" style="stroke:#b0c4de;stroke-width:1" y2="75" x2="1920" y1="75" x1="0" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line1" style="stroke:#9370db;stroke-width:2" y2="100" x2="1920" y1="100" x1="0" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line_inter2_1" style="stroke:#b0c4de;stroke-width:1" y2="125" x2="1920" y1="125" x1="0" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line_inter2_2" style="stroke:#b0c4de;stroke-width:1" y2="150" x2="1920" y1="150" x1="0" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line_inter2_3" style="stroke:#b0c4de;stroke-width:1" y2="175" x2="1920" y1="175" x1="0" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line2" style="stroke:#9370db;stroke-width:2" y2="200" x2="1920" y1="200" x1="0" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line_inter3_1" style="stroke:#b0c4de;stroke-width:1" y2="225" x2="1920" y1="225" x1="0" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line_inter3_2" style="stroke:#b0c4de;stroke-width:1" y2="250" x2="1920" y1="250" x1="0" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line_inter3_3" style="stroke:#b0c4de;stroke-width:1" y2="275" x2="1920" y1="275" x1="0" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line3" style="stroke:#9370db;stroke-width:2" y2="300" x2="1920" y1="300" x1="0" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line_inter4_1" style="stroke:#b0c4de;stroke-width:1" y2="325" x2="1920" y1="325" x1="0" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line_inter4_2" style="stroke:#b0c4de;stroke-width:1" y2="350" x2="1920" y1="350" x1="0" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line_inter4_3" style="stroke:#b0c4de;stroke-width:1" y2="375" x2="1920" y1="375" x1="0" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line4" style="stroke:#9370db;stroke-width:2" y2="400" x2="1920" y1="400" x1="0" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line_inter5_1" style="stroke:#b0c4de;stroke-width:1" y2="425" x2="1920" y1="425" x1="0" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line_inter5_2" style="stroke:#b0c4de;stroke-width:1" y2="450" x2="1920" y1="450" x1="0" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line_inter5_3" style="stroke:#b0c4de;stroke-width:1" y2="475" x2="1920" y1="475" x1="0" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line5" style="stroke:#9370db;stroke-width:2" y2="500" x2="1920" y1="500" x1="0" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line_inter6_1" style="stroke:#b0c4de;stroke-width:1" y2="525" x2="1920" y1="525" x1="0" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line_inter6_2" style="stroke:#b0c4de;stroke-width:1" y2="550" x2="1920" y1="550" x1="0" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line_inter6_3" style="stroke:#b0c4de;stroke-width:1" y2="575" x2="1920" y1="575" x1="0" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line6" style="stroke:#9370db;stroke-width:2" y2="600" x2="1920" y1="600" x1="0" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line_inter7_1" style="stroke:#b0c4de;stroke-width:1" y2="625" x2="1920" y1="625" x1="0" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line_inter7_2" style="stroke:#b0c4de;stroke-width:1" y2="650" x2="1920" y1="650" x1="0" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line_inter7_3" style="stroke:#b0c4de;stroke-width:1" y2="675" x2="1920" y1="675" x1="0" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line7" style="stroke:#9370db;stroke-width:2" y2="700" x2="1920" y1="700" x1="0" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line_inter8_1" style="stroke:#b0c4de;stroke-width:1" y2="725" x2="1920" y1="725" x1="0" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line_inter8_2" style="stroke:#b0c4de;stroke-width:1" y2="750" x2="1920" y1="750" x1="0" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line_inter8_3" style="stroke:#b0c4de;stroke-width:1" y2="775" x2="1920" y1="775" x1="0" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line8" style="stroke:#9370db;stroke-width:2" y2="800" x2="1920" y1="800" x1="0" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line_inter9_1" style="stroke:#b0c4de;stroke-width:1" y2="825" x2="1920" y1="825" x1="0" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line_inter9_2" style="stroke:#b0c4de;stroke-width:1" y2="850" x2="1920" y1="850" x1="0" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line_inter9_3" style="stroke:#b0c4de;stroke-width:1" y2="875" x2="1920" y1="875" x1="1" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line9" style="stroke:#9370db;stroke-width:2" y2="900" x2="1920" y1="900" x1="0" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line_inter10_1" style="stroke:#b0c4de;stroke-width:1" y2="925" x2="1920" y1="925" x1="0" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line_inter10_2" style="stroke:#b0c4de;stroke-width:1" y2="950" x2="1920" y1="950" x1="0" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line_inter10_3" style="stroke:#b0c4de;stroke-width:1" y2="975" x2="1920" y1="975" x1="1" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line10" style="stroke:#9370db;stroke-width:2" y2="1000" x2="1920" y1="1000" x1="0" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line_inter11_1" style="stroke:#b0c4de;stroke-width:1" y2="1025" x2="1920" y1="1025" x1="0" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line_inter11_2" style="stroke:#b0c4de;stroke-width:1" y2="1050" x2="1920" y1="1050" x1="0" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line_inter11_3" style="stroke:#b0c4de;stroke-width:1" y2="1075" x2="1920" y1="1075" x1="1" /> </g> </xsl:template> ]]> </xsl:text> <xsl:for-each select="objets/objet"> <xsl:text><![CDATA[<xsl:template name="]]></xsl:text><xsl:value-of select="@nom_obj"/><xsl:text><![CDATA["> ]]></xsl:text> <xsl:copy-of select="*"/> <xsl:text><![CDATA[ </xsl:template> ]]></xsl:text> </xsl:for-each> <xsl:text><![CDATA[ </xsl:stylesheet> ]]></xsl:text> </xsl:template> </xsl:stylesheet>
Résultat
<!-- Nom de fichier : transfo_dessin_html.xsl --> <!-- Creation : Milib le 21/09/2018 --> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ns="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://web.resource.org/cc/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" > <xsl:output method="xml" encoding="UTF-8" /> <xsl:template match="/"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> <meta name="description" content="dessin svg"/> </head> <body> <xsl:for-each select="dessins/image"> <!-- cadre de l'image --> <div id="{@ref}" name="{@ref}" title="{@ref}" style="border:1px dotted black;"> <svg id="dessin_{@ref}" viewBox="0 0 1920 1080"> <!-- format de l'image --> <xsl:call-template name="quadrillage_cahier"/> <xsl:apply-templates select="objet"> </xsl:apply-templates> </svg> </div> </xsl:for-each> </body> </html> </xsl:template> <!-- Ecriture du dessin --> <xsl:template match="objet"> <xsl:variable name="nom_elem_image"><xsl:value-of select="@nom"/></xsl:variable> <!-- texte commentaire de l'objet --> <text x="{@x}" y="{@y}" style="fill:#101010;-inkscape-font-specification:Arial;font-family:Arial;font-weight:normal;font-style:normal;font-stretch:normal;font-variant:normal;font-size:80px;" ><xsl:value-of select="@comm"/></text> <!-- objet image, avec ses transformations de translation et ratio de taille --> <g id="{@name}" transform="translate({@x},{@y})"> <g transform="matrix({@ratio},0,0,{@ratio},0,0)"> <xsl:choose> <xsl:when test="$nom_elem_image='alsacien'"><xsl:call-template name="alsacien"/></xsl:when> <xsl:when test="$nom_elem_image='alsacienne'"><xsl:call-template name="alsacienne"/></xsl:when> <xsl:when test="$nom_elem_image='alsace'"><xsl:call-template name="alsace"/></xsl:when> <xsl:when test="$nom_elem_image='mulhouse_alsace'"><xsl:call-template name="mulhouse_alsace"/></xsl:when> <xsl:when test="$nom_elem_image='roue_mulhouse'"><xsl:call-template name="roue_mulhouse"/></xsl:when> <xsl:when test="$nom_elem_image='chien'"><xsl:call-template name="chien"/></xsl:when> <xsl:when test="$nom_elem_image='chat'"><xsl:call-template name="chat"/></xsl:when> <xsl:when test="$nom_elem_image='chat_lait'"><xsl:call-template name="chat_lait"/></xsl:when> <xsl:when test="$nom_elem_image='lapin'"><xsl:call-template name="lapin"/></xsl:when> <xsl:when test="$nom_elem_image='zero'"><xsl:call-template name="zero"/></xsl:when> <xsl:when test="$nom_elem_image='un'"><xsl:call-template name="un"/></xsl:when> <xsl:when test="$nom_elem_image='deux'"><xsl:call-template name="deux"/></xsl:when> <xsl:when test="$nom_elem_image='trois'"><xsl:call-template name="trois"/></xsl:when> <xsl:when test="$nom_elem_image='quatre'"><xsl:call-template name="quatre"/></xsl:when> <xsl:when test="$nom_elem_image='cinq'"><xsl:call-template name="cinq"/></xsl:when> <xsl:when test="$nom_elem_image='six'"><xsl:call-template name="six"/></xsl:when> <xsl:when test="$nom_elem_image='sept'"><xsl:call-template name="sept"/></xsl:when> <xsl:when test="$nom_elem_image='huit'"><xsl:call-template name="huit"/></xsl:when> <xsl:when test="$nom_elem_image='neuf'"><xsl:call-template name="neuf"/></xsl:when> <xsl:when test="$nom_elem_image='dix'"><xsl:call-template name="dix"/></xsl:when> </xsl:choose> </g> </g> </xsl:template> <!-- dessin du quadrillage de fond de l'image --> <xsl:template name="quadrillage_cahier"> <g id="gCahier"> <rect inkscape:export-filename="F:\XML_SVG\cahier_seyes.png" inkscape:export-ydpi="90" inkscape:export-xdpi="90" y="0" x="0" height="1080" width="1920" id="rectFondBlanc" style="fill:#ffffff;fill-opacity:1;stroke:none" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line_marge" style="stroke:#ffc0cb;stroke-width:2" y2="1080" x2="400" y1="0" x1="400" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line_verticale1" style="stroke:#b0c4de;stroke-width:2" y2="1080" x2="500" y1="0" x1="500" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line_verticale2" style="stroke:#b0c4de;stroke-width:2" y2="1080" x2="600" y1="0" x1="600" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line_verticale3" style="stroke:#b0c4de;stroke-width:2" y2="1080" x2="700" y1="0" x1="700" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line_verticale4" style="stroke:#b0c4de;stroke-width:2" y2="1080" x2="800" y1="0" x1="800" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line_verticale5" style="stroke:#b0c4de;stroke-width:2" y2="1080" x2="900" y1="0" x1="900" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line_verticale6" style="stroke:#b0c4de;stroke-width:2" y2="1080" x2="1000" y1="0" x1="1000" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line_verticale7" style="stroke:#b0c4de;stroke-width:2" y2="1080" x2="1100" y1="0" x1="1100" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line_verticale8" style="stroke:#b0c4de;stroke-width:2" y2="1080" x2="1200" y1="0" x1="1200" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line_verticale9" style="stroke:#b0c4de;stroke-width:2" y2="1080" x2="1300" y1="0" x1="1300" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line_verticale10" style="stroke:#b0c4de;stroke-width:2" y2="1080" x2="1400" y1="0" x1="1400" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line_verticale11" style="stroke:#b0c4de;stroke-width:2" y2="1080" x2="1500" y1="0" x1="1500" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line_verticale12" style="stroke:#b0c4de;stroke-width:2" y2="1080" x2="1600" y1="0" x1="1600" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line_verticale13" style="stroke:#b0c4de;stroke-width:2" y2="1080" x2="1700" y1="0" x1="1700" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line_verticale14" style="stroke:#b0c4de;stroke-width:2" y2="1080" x2="1800" y1="0" x1="1800" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line_verticale15" style="stroke:#b0c4de;stroke-width:2" y2="1080" x2="1900" y1="0" x1="1900" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line_inter1_1" style="stroke:#b0c4de;stroke-width:1" y2="25" x2="1920" y1="25" x1="0" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line_inter1_2" style="stroke:#b0c4de;stroke-width:1" y2="50" x2="1920" y1="50" x1="0" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line_inter1_3" style="stroke:#b0c4de;stroke-width:1" y2="75" x2="1920" y1="75" x1="0" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line1" style="stroke:#9370db;stroke-width:2" y2="100" x2="1920" y1="100" x1="0" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line_inter2_1" style="stroke:#b0c4de;stroke-width:1" y2="125" x2="1920" y1="125" x1="0" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line_inter2_2" style="stroke:#b0c4de;stroke-width:1" y2="150" x2="1920" y1="150" x1="0" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line_inter2_3" style="stroke:#b0c4de;stroke-width:1" y2="175" x2="1920" y1="175" x1="0" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line2" style="stroke:#9370db;stroke-width:2" y2="200" x2="1920" y1="200" x1="0" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line_inter3_1" style="stroke:#b0c4de;stroke-width:1" y2="225" x2="1920" y1="225" x1="0" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line_inter3_2" style="stroke:#b0c4de;stroke-width:1" y2="250" x2="1920" y1="250" x1="0" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line_inter3_3" style="stroke:#b0c4de;stroke-width:1" y2="275" x2="1920" y1="275" x1="0" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line3" style="stroke:#9370db;stroke-width:2" y2="300" x2="1920" y1="300" x1="0" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line_inter4_1" style="stroke:#b0c4de;stroke-width:1" y2="325" x2="1920" y1="325" x1="0" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line_inter4_2" style="stroke:#b0c4de;stroke-width:1" y2="350" x2="1920" y1="350" x1="0" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line_inter4_3" style="stroke:#b0c4de;stroke-width:1" y2="375" x2="1920" y1="375" x1="0" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line4" style="stroke:#9370db;stroke-width:2" y2="400" x2="1920" y1="400" x1="0" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line_inter5_1" style="stroke:#b0c4de;stroke-width:1" y2="425" x2="1920" y1="425" x1="0" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line_inter5_2" style="stroke:#b0c4de;stroke-width:1" y2="450" x2="1920" y1="450" x1="0" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line_inter5_3" style="stroke:#b0c4de;stroke-width:1" y2="475" x2="1920" y1="475" x1="0" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line5" style="stroke:#9370db;stroke-width:2" y2="500" x2="1920" y1="500" x1="0" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line_inter6_1" style="stroke:#b0c4de;stroke-width:1" y2="525" x2="1920" y1="525" x1="0" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line_inter6_2" style="stroke:#b0c4de;stroke-width:1" y2="550" x2="1920" y1="550" x1="0" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line_inter6_3" style="stroke:#b0c4de;stroke-width:1" y2="575" x2="1920" y1="575" x1="0" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line6" style="stroke:#9370db;stroke-width:2" y2="600" x2="1920" y1="600" x1="0" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line_inter7_1" style="stroke:#b0c4de;stroke-width:1" y2="625" x2="1920" y1="625" x1="0" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line_inter7_2" style="stroke:#b0c4de;stroke-width:1" y2="650" x2="1920" y1="650" x1="0" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line_inter7_3" style="stroke:#b0c4de;stroke-width:1" y2="675" x2="1920" y1="675" x1="0" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line7" style="stroke:#9370db;stroke-width:2" y2="700" x2="1920" y1="700" x1="0" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line_inter8_1" style="stroke:#b0c4de;stroke-width:1" y2="725" x2="1920" y1="725" x1="0" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line_inter8_2" style="stroke:#b0c4de;stroke-width:1" y2="750" x2="1920" y1="750" x1="0" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line_inter8_3" style="stroke:#b0c4de;stroke-width:1" y2="775" x2="1920" y1="775" x1="0" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line8" style="stroke:#9370db;stroke-width:2" y2="800" x2="1920" y1="800" x1="0" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line_inter9_1" style="stroke:#b0c4de;stroke-width:1" y2="825" x2="1920" y1="825" x1="0" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line_inter9_2" style="stroke:#b0c4de;stroke-width:1" y2="850" x2="1920" y1="850" x1="0" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line_inter9_3" style="stroke:#b0c4de;stroke-width:1" y2="875" x2="1920" y1="875" x1="1" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line9" style="stroke:#9370db;stroke-width:2" y2="900" x2="1920" y1="900" x1="0" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line_inter10_1" style="stroke:#b0c4de;stroke-width:1" y2="925" x2="1920" y1="925" x1="0" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line_inter10_2" style="stroke:#b0c4de;stroke-width:1" y2="950" x2="1920" y1="950" x1="0" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line_inter10_3" style="stroke:#b0c4de;stroke-width:1" y2="975" x2="1920" y1="975" x1="1" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line10" style="stroke:#9370db;stroke-width:2" y2="1000" x2="1920" y1="1000" x1="0" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line_inter11_1" style="stroke:#b0c4de;stroke-width:1" y2="1025" x2="1920" y1="1025" x1="0" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line_inter11_2" style="stroke:#b0c4de;stroke-width:1" y2="1050" x2="1920" y1="1050" x1="0" /> <line inkscape:export-ydpi="91.553131" inkscape:export-xdpi="91.553131" id="line_inter11_3" style="stroke:#b0c4de;stroke-width:1" y2="1075" x2="1920" y1="1075" x1="1" /> </g> </xsl:template> <xsl:template name="alsacien">
</xsl:template> <xsl:template name="alsacienne">
</xsl:template> <xsl:template name="alsace">
</xsl:template> <xsl:template name="mulhouse_alsace">
</xsl:template> <xsl:template name="roue_mulhouse">
</xsl:template> <xsl:template name="chien">
</xsl:template> <xsl:template name="chat">
</xsl:template> <xsl:template name="chat_lait">
</xsl:template> <xsl:template name="lapin">
</xsl:template> <xsl:template name="zero">
</xsl:template> <xsl:template name="un">
</xsl:template> <xsl:template name="deux">
</xsl:template> <xsl:template name="trois">
</xsl:template> <xsl:template name="quatre">
</xsl:template> <xsl:template name="cinq">
</xsl:template> <xsl:template name="six">
</xsl:template> <xsl:template name="sept">
</xsl:template> <xsl:template name="huit">
</xsl:template> <xsl:template name="neuf">
</xsl:template> <xsl:template name="dix">
</xsl:template> </xsl:stylesheet>
-
>
Montrer le détail
affichage des images SVG, par la transformation
transfo_
affiche_objets_svg
_html.xsl
?
↓ XSL
<?xml version="1.0" encoding="UTF-8"?> <!-- Nom de fichier : transfo_dessin_html.xsl --> <!-- Creation : Milib le 21/09/2018 --> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ns="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://web.resource.org/cc/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" > <xsl:output method="html" version="4.0" encoding="UTF-8" indent="yes"/> <xsl:template match="/"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> <meta name="description" content="dessin svg"/> <script src="enreg_dessins.js"></script> </head> <body> <a id="enreg_svg" href="#">Enregistrer les dessins</a><br/> <xsl:for-each select="objets/objet"> <br/> <xsl:value-of select="@nom_obj"/> <div id="{@nom_obj}" style="border:1px solid black;"> <svg id="objet_{@nom_obj}" viewBox="0 0 600 400"> <!-- format de l'image --> <xsl:copy-of select="./*"/> </svg> </div> </xsl:for-each> </body> </html> </xsl:template> </xsl:stylesheet>
Résultat
Enregistrer les dessins
alsacien
alsacienne
alsace
mulhouse_alsace
roue_mulhouse
chien
chat
chat_lait
lapin
zero
un
deux
trois
quatre
cinq
six
sept
huit
neuf
dix
-
?>