pingus-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: liquid repeat


From: Carsten Milkau
Subject: Re: liquid repeat
Date: Sat, 8 Oct 2005 18:48:09 +0200
User-agent: KMail/1.7.2

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"/>





reply via email to

[Prev in Thread] Current Thread [Next in Thread]