paulb@19 | 1 | <?xml version="1.0" encoding="utf-8"?> |
paulb@19 | 2 | <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" |
paulb@19 | 3 | xmlns:template="http://www.boddie.org.uk/ns/xmltools/template" |
paulb@19 | 4 | version="1.0"> |
paulb@19 | 5 | |
paulb@19 | 6 | <xsl:param name="categories"/> |
paulb@19 | 7 | |
paulb@19 | 8 | <xsl:template match="discriminator"> |
paulb@19 | 9 | <xsl:copy> |
paulb@19 | 10 | <xsl:element name="category"> |
paulb@19 | 11 | <xsl:attribute name="value"><xsl:value-of select="@category"/></xsl:attribute> |
paulb@19 | 12 | <xsl:copy-of select="$categories/category/category-enum"/> |
paulb@19 | 13 | </xsl:element> |
paulb@19 | 14 | </xsl:copy> |
paulb@19 | 15 | </xsl:template> |
paulb@19 | 16 | |
paulb@19 | 17 | <!-- Replicate unknown elements. --> |
paulb@19 | 18 | |
paulb@19 | 19 | <xsl:template match="@*|node()"> |
paulb@19 | 20 | <xsl:copy> |
paulb@19 | 21 | <xsl:apply-templates select="@*|node()"/> |
paulb@19 | 22 | </xsl:copy> |
paulb@19 | 23 | </xsl:template> |
paulb@19 | 24 | |
paulb@19 | 25 | </xsl:stylesheet> |