Hi Jason,
the things you mentioned are fortunately relatively simple (see below),
I will have a look at the transformation stylesheet you provided and
see if I can improve it. :)
Carsten
Jason Green schrieb:
> if a <music> tag excepts, use it, otherwise, use <music>none</music>
<xsl:choose>
<xsl:when test="music">
<xsl:copy-of select="music"/>
</xsl:when>
<xsl:otherwise>
<music>none</music>
</xsl:otherwise>
</xsl>
> if a <modifier></modifier> exists, change it to
> <modifier>ROT0</modifier>
<xsl:template match="modifier">
<modifier>
<xsl:choose>
<xsl:when test="string(.) = ''">
<xsl:text>ROT0</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="."/>
</xsl:otherwise>
</xsl:choose>
</modifier>
</xsl:template>
> For traps:
>
> currently, the format is:
>
> <trap>
> <type>hammer</type>
> <position>
> <x-pos>2</x-pos>
> ...
> </position>
> </trap>
>
> Needs to be:
>
> <hammer>
> <position>
> <x>2</x>
> ..
> </positon>
> </hammer>
<xsl:template match="trap">
<xsl:element name="type">
<xsl:apply-templates/>
</xsl:element>
</xsl:template>
<!-- ignore type tag -->
<xsl:template match="trap/type"/>
_______________________________________________
Pingus-Devel mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/pingus-devel