You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@forrest.apache.org by je...@apache.org on 2002/11/03 16:46:53 UTC

cvs commit: xml-forrest/src/resources/schema/relax/unstable any.rng any.rnx forrestbot.rng forrestbot.rnx

jefft       2002/11/03 07:46:53

  Added:       src/resources/schema/relax/unstable any.rng any.rnx
                        forrestbot.rng forrestbot.rnx
  Log:
  In-development schemas
  
  Revision  Changes    Path
  1.1                  xml-forrest/src/resources/schema/relax/unstable/any.rng
  
  Index: any.rng
  ===================================================================
  <?xml version="1.0"?>
  <!--
  A RELAX NG schema that matches the (ANY) content type. Useful for prototyping,
  where you don't (yet) care what an element contains. Include it in another RNG
  schema with this line:
  
  <include href="any.rng"/>
  
  Taken from an email to XML-DEV by John Cowan, Subject "Re: [xml-dev] Quick
  RelaxNG question"
  
  $Revision: 1.1 $ $Date: 2002/11/03 15:46:52 $
  Jeff Turner <je...@apache.org>
  -->
  <grammar xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
    <start>
      <element>
        <anyName/>
        <ref name="ANY"/>
      </element>
    </start>
    <define name="ANY">
      <interleave>
        <zeroOrMore>
          <attribute>
            <anyName/>
            <text/>
          </attribute>
        </zeroOrMore>
        <zeroOrMore>
          <element>
            <anyName/>
            <ref name="ANY"/>
          </element>
        </zeroOrMore>
        <text/>
      </interleave>
    </define>
  </grammar>
  
  
  
  1.1                  xml-forrest/src/resources/schema/relax/unstable/any.rnx
  
  Index: any.rnx
  ===================================================================
  # A RELAX NG schema that matches any XML. Useful for prototyping, where you
  # don't (yet) care what an element contains. Include it in another RNG schema
  # with this line:
  # 
  # <include href="any.rng"/>  (.rng syntax)
  # or: 
  # include "any.rnx"          (.rnx syntax)
  # 
  # Taken from an email to XML-DEV by John Cowan, Subject "Re: [xml-dev] Quick
  # RelaxNG question"
  # 
  # $Revision: 1.1 $ $Date: 2002/11/03 15:46:52 $
  # Jeff Turner <je...@apache.org>
  
  # start = element * { any }
  
  any = attribute * { text }* |
        element * { any }*
  
  
  
  1.1                  xml-forrest/src/resources/schema/relax/unstable/forrestbot.rng
  
  Index: forrestbot.rng
  ===================================================================
  <?xml version="1.0"?>
  <grammar xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
    <include href="any.rng"/>
  
    <start>
      <ref name="forrest-config"/>
    </start>
  
  
    <define name="forrest-config">
      <element name="forrest-config">
        <ref name="defaults"/>
      </element>
    </define>
  
  
    <define name="defaults">
      <element name="defaults">
        <zeroOrMore>
          <element>
            <anyName/>
            <optional>
              <attribute name="type"/>
            </optional>
            <zeroOrMore>
              <element>
                <anyName/>
                <ref name="ANY"/>
              </element>
            </zeroOrMore>
          </element>
        </zeroOrMore>
        <!--
        <ref name="ANY"/>
        -->
      </element>
    </define>
  
  </grammar>
  
  
  
  1.1                  xml-forrest/src/resources/schema/relax/unstable/forrestbot.rnx
  
  Index: forrestbot.rnx
  ===================================================================
  # $Revision: 1.1 $ $Date: 2002/11/03 15:46:52 $
  # Jeff Turner <je...@apache.org>
  
  datatypes xsd = "http://www.w3.org/2001/XMLSchema-datatypes"
  
  include "any.rnx"
  
  start =             forrest-config
  forrest-config =    element forrest-config {
                        defaults,
                        any
                      }
  
  defaults =          element defaults {
                        element * {
                          attribute type {text}?,
                          element * { any }*
                        }*
                      }