Sha256: 363de3f306d4101ae48d6c4214ea0415390dc18d59970112b274d9e2ff2af47e
Contents?: true
Size: 1.46 KB
Versions: 2
Compression:
Stored size: 1.46 KB
Contents
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:output method="xml" indent="yes"/> <xsl:strip-space elements="*"/> <xsl:template match="node()|@*"> <xsl:copy> <xsl:apply-templates select="node()|@*"/> </xsl:copy> </xsl:template> <xsl:template match="things"> <mainElements> <xsl:apply-templates select="thing|comment()"/> </mainElements> </xsl:template> <xsl:template match="thing"> <specialThing> <xsl:apply-templates select="weight"/> <xsl:apply-templates select="color"/> <xsl:apply-templates select="state"/> </specialThing> <xsl:apply-templates select="comment()[not(following-sibling::*)]"/> </xsl:template> <xsl:template match="weight"> <xsl:apply-templates select="preceding-sibling::comment()[generate-id(following-sibling::*[1])=generate-id(current())]"/> <PropertyOne> <xsl:value-of select="."/> </PropertyOne> </xsl:template> <xsl:template match="color"> <xsl:apply-templates select="preceding-sibling::comment()[generate-id(following-sibling::*[1])=generate-id(current())]"/> <PropertyTwo> <xsl:value-of select="."/> </PropertyTwo> </xsl:template> <xsl:template match="state"> <xsl:apply-templates select="preceding-sibling::comment()[generate-id(following-sibling::*[1])=generate-id(current())]"/> <PropertyThree> <xsl:value-of select="."/> </PropertyThree> </xsl:template> </xsl:stylesheet>
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
gpx_track_generator-0.3.5 | lib/gpx_track_generator/pretty.xslt |
gpx_track_generator-0.3.3 | lib/gpx_track_generator/pretty.xslt |