Commits

Shlomi Fish committed b1c240d

More progress - still does not validate.

  • Participants
  • Parent commits 71a5f17

Comments (0)

Files changed (3)

File bin/convert-bad-elements-wml-to-vered-xml.bash

 wml --passoption=3,-Ilib -Ilib -DLATEMP_THEME=better-scm -DLATEMP_SERVER=berlios --passoption=2,-X3074 --passoption=3,-I../lib/ --passoption=3,-w -I/home/shlomif/apps/latemp//lib/wml/include/ --passoption=2,-I/home/shlomif/apps/latemp//lib/wml/include/ -I/home/shlomif/.latemp/lib/ --passoption=2,-I/home/shlomif/.latemp/lib/ -I. -DROOT~. -I../lib/ --passoption=7,"-S imgsize" -I ${HOME}/apps/wml -I $HOME/conf/wml/Latemp/lib -DLATEMP_SERVER=berlios -DLATEMP_FILENAME=tutorials/bad-elements/index.html -o test.xml lib/XML-Grammar-Vered/bad-elements-to-xml.wml
+jing lib/XML-Grammar-Vered/vered-xml.rng test.xml 2>&1

File lib/XML-Grammar-Vered/bad-elements-to-xml.wml

 <?xml version="1.0" encoding="utf-8"?>
-<document xmlns="http://www.shlomifish.org/open-source/projects/XML-Grammar/Vered/">
+<document xmlns="http://www.shlomifish.org/open-source/projects/XML-Grammar/Vered/" xmlns:xlink="http://www.w3.org/1999/xlink" version="0.2.0">
 <info>
 <title>Perl Elements to Avoid</title>
 </info>
 
+<define-tag a endtag="required" whitespace="delete">
+<preserve href />
+<set-var %attributes />
+
+<a* xlink:href="<get-var href />">%body</a*>
+
+<restore href />
+
+</define-tag>
 <body>
 <preface xml:id="intro">
 
 
 </main_list>
 
+</section>
+
 </body>
 
 </document>

File lib/XML-Grammar-Vered/vered-xml.rng

             <element name="vrd:body">
                 <ref name="common_attrs" />
                 <zeroOrMore>
-                    <element name="preface">
-                        <ref name="section" />
+                    <element name="vrd:preface">
+                        <ref name="section_contents" />
                     </element>
                 </zeroOrMore>
                 <oneOrMore>
             </element>
         </element>
     </start>
-    <define name="common_attrs">
+    <define name="global_attrs">
         <optional>
             <attribute name="xml:id">
                 <data type="ID"/>
                 <data type="NCName" />
             </attribute>
         </optional>
+    </define>
+    <define name="common_attrs">
+        <ref name="global_attrs" />
         <optional>
             <attribute name="xlink:href">
                 <data type="anyURI"/>
         </optional>
     </define>
     <define name="section_contents">
-        <ref name="common_attrs" />
+        <ref name="global_attrs" />
         <ref name="info" />
         <ref name="several_paras" />
         <zeroOrMore>
             <text />
             <ref name="b" />
             <ref name="i" />
+            <element name="vrd:strong">
+                <text />
+            </element>
+            <element name="vrd:em">
+                <text />
+            </element>
         </choice>
     </define>
     <define name="span">