Work on musicxml conversion
authorJelmer Vernooij <jelmer@samba.org>
Tue, 21 Jun 2005 15:05:24 +0000 (16:05 +0100)
committerJelmer Vernooij <jelmer@samba.org>
Tue, 21 Jun 2005 15:05:24 +0000 (16:05 +0100)
ptbxml.dtd
ptbxml2musicxml.xsl

index d4e33999830feec4019419c645fbf5ced5c56425..9a96c4e1f44e959a2e8f92f28fb49cd86a64c7c5 100644 (file)
@@ -30,7 +30,7 @@
 <!ELEMENT guitars (guitar*)>
 <!ELEMENT guitar (tuning,title,type,reverb,chorus,tremolo,pan,capo,initial_volume,midi_instrument,half_up,simulate)>
 <!ATTLIST guitar id ID #REQUIRED>
-<!ELEMENT tuning (stringtuning*>)
+<!ELEMENT tuning (stringtuning*)>
 <!ELEMENT stringtuning EMPTY>
 <!ATTLIST stringtuning 
        octave CDATA #REQUIRED 
index b69497c0806791e3233f930c2b562a787938356e..70784bf43c82784a3492d7c635e32cccb7e748cd 100644 (file)
                </xsl:element>
        </xsl:template>
 
-       <xsl:template match="song/title"><!--FIXME-->
-       </xsl:template>
-       <xsl:template match="song/artist"><!--FIXME-->
-       </xsl:template>
-
        <xsl:template match="sections"><xsl:apply-templates/></xsl:template>
 
        <xsl:template match="section">
                <xsl:element name="measure">
                        <xsl:attribute name="number"><xsl:text>1</xsl:text></xsl:attribute>
+                       <xsl:element name="attributes">
+                       
+                               <xsl:element name="time">
+                                       <xsl:element name="beats"><xsl:value-of select="beat"/></xsl:element>
+                                       <xsl:element name="beat-type"><xsl:value-of select="beat-type"/></xsl:element>
+                               </xsl:element>
+                       </xsl:element>
+                       <xsl:apply-templates select="staffs"/>
+               </xsl:element>
+       </xsl:template>
+
+       <xsl:template match="linedata">
+               <xsl:element name="pitch">
+                       <!--FIXME-->
+               </xsl:element>
+       </xsl:template>
+
+       <xsl:template match="position">
+               <xsl:apply-templates select="linedatas/linedata"/>
+               <xsl:if test="dots = 1">
+                       <xsl:element name="dot"/>
+               </xsl:if>
+               <xsl:element name="duration">
+                       <xsl:value-of select="length"/>
                </xsl:element>
        </xsl:template>