]> git.sesse.net Git - mlt/commitdiff
added westley.dtd
authorddennedy <ddennedy@d19143bc-622f-0410-bfdd-b5b2a6649095>
Fri, 26 Mar 2004 21:15:15 +0000 (21:15 +0000)
committerddennedy <ddennedy@d19143bc-622f-0410-bfdd-b5b2a6649095>
Fri, 26 Mar 2004 21:15:15 +0000 (21:15 +0000)
git-svn-id: https://mlt.svn.sourceforge.net/svnroot/mlt/trunk/mlt@253 d19143bc-622f-0410-bfdd-b5b2a6649095

demo/entity.westley
demo/new.westley
docs/westley.txt
src/modules/westley/Makefile
src/modules/westley/producer_westley.c
src/modules/westley/westley.dtd [new file with mode: 0644]

index a54f4e1cf647ed01048be2ece4bd9830483ec887..0f6a6b947a00808d6193edde749e569d53ac8c82 100644 (file)
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<!DOCTYPE westley [
+<!DOCTYPE westley SYSTEM "../src/modules/westley/westley.dtd" [
        <!ENTITY name "Westley">
 ]>
 <westley>
index e5005b9f32b1f31d4258be90abc976b051b40977..c623b3ecb4ca19c9db4ab16b5de5b5bc8dc284c2 100644 (file)
     <transition in="25" out="49" a_track="0" b_track="1">
       <property name="mlt_service">luma</property>
     </transition>
-    <transition in="75" out="99" a_track="0" b_track="1" reverse="1">
-      <property name="mlt_service">luma</property>
+    <transition in="75" out="99" a_track="0" b_track="1" mlt_service="luma">
+         <property name="reverse" value="1"/>
     </transition>
   </entry>
 
   <entry>
     <multitrack>
          <playlist>
-        <producer id="foo" in="100" out="149">
-             <property name="resource">clip2.mpeg</property>
-               </producer>
+        <entry producer="foo" in="100" out="149"/>
                <blank length="25"/>
         <entry producer="foo" in="10" out="59"/>
          </playlist>
          <playlist>
                <blank length="25"/>
-               <producer id="bar" in="100" out="149">
-                 <property name="resource">clip3.mpeg</property>
-               </producer>
+               <entry producer="bar" in="100" out="149"/>
                <entry out="99" producer="bar"/>
          </playlist>
     </multitrack>
     <transition in="25" out="49" a_track="0" b_track="1">
       <property name="mlt_service">luma</property>
     </transition>
-    <transition in="75" out="99" a_track="0" b_track="1" reverse="1">
-      <property name="mlt_service">luma</property>
+    <transition in="75" out="99" a_track="0" b_track="1" mlt_service="luma">
+      <property name="reverse">1</property>
     </transition>
   </entry>
 
index c36fa6e77a1189611d7c21ef863f22d87be2d86f..5625c5d4e7fd8c3d2c075d973ffff13e1bc72764 100644 (file)
@@ -4,7 +4,12 @@ WESTLEY
 Preamble:
 
        Westley is the MLT projects XML serialisation/deserialisation format -
-       as such, it closely mirrors the internal structure of the MLT API. 
+       as such, it closely mirrors the internal structure of the MLT API.
+
+       If you just want to go straight to the DTD, then see 
+       mlt/src/modules/westley.dtd, which gets installed at 
+       $(prefix)/share/mlt/modules/westley.dtd. Currently, the westley parser is
+       non-validating.
 
 
 Introduction:
index b0a8d0116ad35ad1bdd453b46664aa37b49cab9b..a5d5d184bb64c03ad12d397055f0598a429ad783 100644 (file)
@@ -28,6 +28,7 @@ clean:
 
 install: all
        install -m 755 $(TARGET) "$(prefix)/share/mlt/modules"
+       install -m 644 westley.dtd "$(prefix)/share/mlt/modules"
 
 ifneq ($(wildcard .depend),)
 include .depend
index dfaa8ceb1ad7823c313c01e328936d5866041b64..f6a864199134417585c40c0e3065bad5c6334ac5 100644 (file)
@@ -979,7 +979,7 @@ static void on_characters( void *ctx, const xmlChar *ch, int len )
 
        value[ len ] = 0;
        strncpy( value, (const char*) ch, len );
-       
+
        if ( context->stack_node_size > 0 )
                xmlNodeAddContent( context->stack_node[ context->stack_node_size - 1 ], ( xmlChar* )value );
 
diff --git a/src/modules/westley/westley.dtd b/src/modules/westley/westley.dtd
new file mode 100644 (file)
index 0000000..4b926d7
--- /dev/null
@@ -0,0 +1,64 @@
+<?xml version='1.0' encoding='utf-8'?>
+
+<!-- MLT westley DTD v0.1.0 -->
+
+<!ELEMENT westley (producer | playlist | tractor | multitrack)+ >
+<!ELEMENT property ANY >
+<!ATTLIST property 
+    name     CDATA    #REQUIRED
+    value    CDATA    #IMPLIED
+>
+<!ELEMENT producer (property)* >
+<!ATTLIST producer
+    id       ID       #IMPLIED
+    in       CDATA    #IMPLIED
+    out      CDATA    #IMPLIED
+    mlt_service  CDATA    #IMPLIED
+>
+<!ELEMENT filter (property)* >
+<!ATTLIST filter
+    id       ID       #IMPLIED
+    in       CDATA    #IMPLIED
+    out      CDATA    #IMPLIED
+    mlt_service  CDATA    #IMPLIED
+    track    CDATA    #IMPLIED
+>
+<!ELEMENT transition (property)* >
+<!ATTLIST transition
+    id       ID       #IMPLIED
+    in       CDATA    #IMPLIED
+    out      CDATA    #IMPLIED
+    mlt_service  CDATA    #IMPLIED
+    a_track  CDATA    #IMPLIED
+    b_track  CDATA    #IMPLIED
+>
+<!ELEMENT playlist (entry | blank | producer | playlist | tractor | multitrack)+ >
+<!ATTLIST playlist
+    id       ID       #IMPLIED
+    in       CDATA    #IMPLIED
+    out      CDATA    #IMPLIED
+>
+<!ELEMENT entry (producer | playlist | tractor | multitrack | filter | transition)* >
+<!ATTLIST entry
+    producer IDREF    #IMPLIED
+    in       CDATA    #IMPLIED
+    out      CDATA    #IMPLIED
+>
+<!ELEMENT blank EMPTY >
+<!ATTLIST blank
+    length   CDATA    #REQUIRED
+>
+<!ELEMENT tractor (multitrack, (filter | transition)*) >
+<!ATTLIST tractor
+    id       ID       #IMPLIED
+    in       CDATA    #IMPLIED
+    out      CDATA    #IMPLIED
+>
+<!ELEMENT multitrack (track | producer | playlist | tractor | multitrack)+ >
+<!ATTLIST multitrack
+    id       ID       #IMPLIED
+>
+<!ELEMENT track (producer | playlist | tractor | multitrack | filter | transition)* >
+<!ATTLIST track
+    producer IDREF    #IMPLIED
+>