All pastes #485142 Raw Edit

Untitled

public xml v1 · immutable
·published 2007-05-12 21:49 UTC
rendered paste body
<?xml version="1.0" encoding="ISO-8859-1"?><xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"><xsl:output method='text' version='1.0' encoding='UTF-8'/><xsl:template match="/">	<xsl:apply-templates/></xsl:template><xsl:template match="document"><xsl:value-of select="*//require"/>	<xsl:apply-templates/>}</xsl:template><xsl:template match="main">	<xsl:value-of select="."/>{</xsl:template><xsl:template match="conf">	<xsl:apply-templates/></xsl:template><xsl:template match="array">	<xsl:value-of select="type"/>&#160;<xsl:value-of select="id"/>[] = { 		<xsl:for-each select="value">		<xsl:choose>		<xsl:when test="position() &lt; last()">			<xsl:value-of select="."/> ,		</xsl:when>		<xsl:otherwise>			<xsl:value-of select="."/> } ;		</xsl:otherwise>		</xsl:choose>			</xsl:for-each></xsl:template><xsl:template match="counter">	counter	<xsl:value-of select="id"/>;<xsl:apply-templates select="struct"/></xsl:template><xsl:template match="device">	<xsl:apply-templates select="var"/></xsl:template><xsl:template match="struct">	<xsl:for-each select="var">	cpt.<xsl:value-of select="id"/> = <xsl:value-of select="value"/> ;</xsl:for-each></xsl:template><xsl:template match="var">	<xsl:value-of select="type"/>&#160;<xsl:value-of select="id"/><xsl:if test="value/* or value/text()"> = <xsl:value-of select="value"/> </xsl:if>;</xsl:template></xsl:stylesheet>