forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cross...@apache.org
Subject cvs commit: xml-forrest/src/resources/schema/relaxng/unstable any.rng any.rnx forrestbot.rng forrestbot.rnx
Date Thu, 07 Nov 2002 06:37:02 GMT
crossley    2002/11/06 22:37:02

  Modified:    src/resources/forrest-shbat forrest.build.xml
  Added:       src/resources/schema/relaxng README.txt skinconf-v10.rng
                        xslt.rng
               src/resources/schema/relaxng/unstable any.rng any.rnx
                        forrestbot.rng forrestbot.rnx
  Removed:     src/resources/schema/relax README.txt skinconf-v10.rng
                        xslt.rng
               src/resources/schema/relax/unstable any.rng any.rnx
                        forrestbot.rng forrestbot.rnx
  Log:
  Changed directory name from "relax" to "relaxng".
  
  Revision  Changes    Path
  1.16      +4 -3      xml-forrest/src/resources/forrest-shbat/forrest.build.xml
  
  Index: forrest.build.xml
  ===================================================================
  RCS file: /home/cvs/xml-forrest/src/resources/forrest-shbat/forrest.build.xml,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- forrest.build.xml	5 Nov 2002 15:45:44 -0000	1.15
  +++ forrest.build.xml	7 Nov 2002 06:37:02 -0000	1.16
  @@ -196,6 +196,7 @@
     <target name="load-forrest-props" unless="skinconf.present">
       <xmlproperty file="${forrest.home}/context/skinconf.xml"
         collapseattributes="true" validate="true"/> <!-- Assume Forrest skinconf is valid -->
  +<!-- FIXME: remove wild assumption -->
     </target>
   
     <!-- Define filters equating to elements in the skinconf.xml file. Skins can
  @@ -715,7 +716,7 @@
   
     <target name="validate-skinconf" depends="validation-props"
       if="validate.skinconf">
  -    <jing rngfile="${forrest.home}/context/resources/schema/relax/skinconf-v10.rng">
  +    <jing rngfile="${forrest.home}/context/resources/schema/relaxng/skinconf-v10.rng">
         <fileset dir="${project.content-dir}"
           includes="${forrest.validate.skinconf.includes}"
           excludes="${forrest.validate.skinconf.excludes}"/>
  @@ -725,7 +726,7 @@
   
     <target name="validate-stylesheets" depends="validation-props"
       if="validate.stylesheets">
  -    <jing rngfile="${forrest.home}/context/resources/schema/relax/xslt.rng">
  +    <jing rngfile="${forrest.home}/context/resources/schema/relaxng/xslt.rng">
         <fileset dir="${project.stylesheets-dir}"
           includes="${forrest.validate.stylesheets.includes}"
           excludes="${forrest.validate.stylesheets.excludes}" />
  @@ -737,7 +738,7 @@
   
     <target name="validate-skins-stylesheets" depends="validation-props"
       if="validate.skins.stylesheets">
  -    <jing rngfile="${forrest.home}/context/resources/schema/relax/xslt.rng">
  +    <jing rngfile="${forrest.home}/context/resources/schema/relaxng/xslt.rng">
         <fileset dir="${project.skins-dir}"
           includes="${forrest.validate.skins.stylesheets.includes}"
           excludes="${forrest.validate.skins.stylesheets.excludes}"/>
  
  
  
  1.1                  xml-forrest/src/resources/schema/relaxng/README.txt
  
  Index: README.txt
  ===================================================================
  This directory contains XML schemas which describe the various XML formats used
  in Forrest.
  
  The schemas are written in RELAX NG, a schema language devised by James Clark,
  SGML boffin, XML inventor and all-round smart guy. RELAX NG is widely regarded
  to be the simplest, most powerful and easy to learn schema language available.
  
  Relevant URLs:
  
  The RELAX NG "home page":
  http://www.oasis-open.org/committees/relax-ng/
  
  The RELAX NG tutorial:
  	http://www.oasis-open.org/committees/relax-ng/tutorial.html
  
  The definition of the non-XML syntax used here (.rnx files):
  	http://www.thaiopensource.com/relaxng/nonxml/syntax.html
  
  The RELAX NG Compact Syntax spec (less readable than the one above):
    http://www.oasis-open.org/committees/relax-ng/compact-20020607.html
  
  
  To run an XML file against a .rng schema:
  
  java -jar $FORREST_HOME/WEB-INF/lib/jing.jar [.rng file] [.xml file]
  
  If you're running JDK 1.3.x or lower, you'll need to add
  $FORREST_HOME/lib/endorsed/*.jar to your classpath first.
  
  -- 
  jefft@apache.org
  $Id: README.txt,v 1.1 2002/11/07 06:37:02 crossley Exp $
  
  
  
  1.1                  xml-forrest/src/resources/schema/relaxng/skinconf-v10.rng
  
  Index: skinconf-v10.rng
  ===================================================================
  <?xml version="1.0" encoding="UTF-8"?>
  <!-- Generated by DTDinst version 2002-07-24. -->
  <grammar datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes" xmlns="http://relaxng.org/ns/structure/1.0">
  <!-- ===================================================================
  
       Apache Forrest Skinconf RELAX NG grammar (Version 1.0)
  
  PURPOSE:
    DRAFT RELAX NG grammar for the Forrest skinconf.xml configuration files.
  
  NOTES:
  
  AUTHORS:
    David Crossley <crossley@indexgeo.com.au>
  
  FIXME:
  - 
  
  CHANGE HISTORY:
  20021102 V0.1 Initial RELAX NG grammar generated from DTD in skinconf.xml
                using DTDinst (DC)
       
  COPYRIGHT:
    Copyright (c) 1999-2002 The Apache Software Foundation.
    
    Permission to copy in any form is granted provided this notice is 
    included in all copies. Permission to redistribute is granted 
    provided this file is distributed untouched in all its parts and 
    included files.
    
  ==================================================================== -->
    <define name="skinconfig">
      <element name="skinconfig">
        <ref name="attlist.skinconfig"/>
        <zeroOrMore>
          <optional>
            <ref name="disable-search"/>
          </optional>
          <optional>
            <ref name="searchsite-domain"/>
          </optional>
          <optional>
            <ref name="searchsite-name"/>
          </optional>
          <ref name="project-name"/>
          <ref name="project-url"/>
          <ref name="project-logo"/>
          <optional>
            <ref name="group-name"/>
          </optional>
          <optional>
            <ref name="group-url"/>
          </optional>
          <optional>
            <ref name="group-logo"/>
          </optional>
          <optional>
            <ref name="host-url"/>
          </optional>
          <optional>
            <ref name="host-logo"/>
          </optional>
          <optional>
            <ref name="year"/>
          </optional>
          <optional>
            <ref name="vendor"/>
          </optional>
          <optional>
            <ref name="trail"/>
          </optional>
          <optional>
            <ref name="credits"/>
          </optional>
        </zeroOrMore>
      </element>
    </define>
    <define name="attlist.skinconfig" combine="interleave">
      <empty/>
    </define>
    <define name="credits">
      <element name="credits">
        <ref name="attlist.credits"/>
        <zeroOrMore>
          <ref name="credit"/>
        </zeroOrMore>
      </element>
    </define>
    <define name="attlist.credits" combine="interleave">
      <empty/>
    </define>
    <define name="credit">
      <element name="credit">
        <ref name="attlist.credit"/>
        <ref name="name"/>
        <ref name="url"/>
        <ref name="image"/>
        <optional>
          <ref name="width"/>
        </optional>
        <optional>
          <ref name="height"/>
        </optional>
      </element>
    </define>
    <define name="attlist.credit" combine="interleave">
      <empty/>
    </define>
    <define name="disable-search">
      <element name="disable-search">
        <ref name="attlist.disable-search"/>
        <text/>
      </element>
    </define>
    <define name="attlist.disable-search" combine="interleave">
      <empty/>
    </define>
    <define name="searchsite-domain">
      <element name="searchsite-domain">
        <ref name="attlist.searchsite-domain"/>
        <text/>
      </element>
    </define>
    <define name="attlist.searchsite-domain" combine="interleave">
      <empty/>
    </define>
    <define name="searchsite-name">
      <element name="searchsite-name">
        <ref name="attlist.searchsite-name"/>
        <text/>
      </element>
    </define>
    <define name="attlist.searchsite-name" combine="interleave">
      <empty/>
    </define>
    <define name="project-name">
      <element name="project-name">
        <ref name="attlist.project-name"/>
        <text/>
      </element>
    </define>
    <define name="attlist.project-name" combine="interleave">
      <empty/>
    </define>
    <define name="project-url">
      <element name="project-url">
        <ref name="attlist.project-url"/>
        <text/>
      </element>
    </define>
    <define name="attlist.project-url" combine="interleave">
      <empty/>
    </define>
    <define name="project-logo">
      <element name="project-logo">
        <ref name="attlist.project-logo"/>
        <text/>
      </element>
    </define>
    <define name="attlist.project-logo" combine="interleave">
      <empty/>
    </define>
    <define name="group-name">
      <element name="group-name">
        <ref name="attlist.group-name"/>
        <text/>
      </element>
    </define>
    <define name="attlist.group-name" combine="interleave">
      <empty/>
    </define>
    <define name="group-url">
      <element name="group-url">
        <ref name="attlist.group-url"/>
        <text/>
      </element>
    </define>
    <define name="attlist.group-url" combine="interleave">
      <empty/>
    </define>
    <define name="group-logo">
      <element name="group-logo">
        <ref name="attlist.group-logo"/>
        <text/>
      </element>
    </define>
    <define name="attlist.group-logo" combine="interleave">
      <empty/>
    </define>
    <define name="host-url">
      <element name="host-url">
        <ref name="attlist.host-url"/>
        <text/>
      </element>
    </define>
    <define name="attlist.host-url" combine="interleave">
      <empty/>
    </define>
    <define name="host-logo">
      <element name="host-logo">
        <ref name="attlist.host-logo"/>
        <text/>
      </element>
    </define>
    <define name="attlist.host-logo" combine="interleave">
      <empty/>
    </define>
    <define name="year">
      <element name="year">
        <ref name="attlist.year"/>
        <text/>
      </element>
    </define>
    <define name="attlist.year" combine="interleave">
      <empty/>
    </define>
    <define name="vendor">
      <element name="vendor">
        <ref name="attlist.vendor"/>
        <text/>
      </element>
    </define>
    <define name="attlist.vendor" combine="interleave">
      <empty/>
    </define>
    <define name="trail">
      <element name="trail">
        <ref name="attlist.trail"/>
        <ref name="link1"/>
        <ref name="link2"/>
        <ref name="link3"/>
      </element>
    </define>
    <define name="attlist.trail" combine="interleave">
      <empty/>
    </define>
    <define name="link1">
      <element name="link1">
        <ref name="attlist.link1"/>
        <empty/>
      </element>
    </define>
    <define name="attlist.link1" combine="interleave">
      <attribute name="name"/>
      <optional>
        <attribute name="href"/>
      </optional>
    </define>
    <define name="link2">
      <element name="link2">
        <ref name="attlist.link2"/>
        <empty/>
      </element>
    </define>
    <define name="attlist.link2" combine="interleave">
      <attribute name="name"/>
      <optional>
        <attribute name="href"/>
      </optional>
    </define>
    <define name="link3">
      <element name="link3">
        <ref name="attlist.link3"/>
        <empty/>
      </element>
    </define>
    <define name="attlist.link3" combine="interleave">
      <attribute name="name"/>
      <optional>
        <attribute name="href"/>
      </optional>
    </define>
    <define name="name">
      <element name="name">
        <ref name="attlist.name"/>
        <text/>
      </element>
    </define>
    <define name="attlist.name" combine="interleave">
      <empty/>
    </define>
    <define name="url">
      <element name="url">
        <ref name="attlist.url"/>
        <text/>
      </element>
    </define>
    <define name="attlist.url" combine="interleave">
      <empty/>
    </define>
    <define name="image">
      <element name="image">
        <ref name="attlist.image"/>
        <text/>
      </element>
    </define>
    <define name="attlist.image" combine="interleave">
      <empty/>
    </define>
    <define name="width">
      <element name="width">
        <ref name="attlist.width"/>
        <text/>
      </element>
    </define>
    <define name="attlist.width" combine="interleave">
      <empty/>
    </define>
    <define name="height">
      <element name="height">
        <ref name="attlist.height"/>
        <text/>
      </element>
    </define>
    <define name="attlist.height" combine="interleave">
      <empty/>
    </define>
    <start>
      <choice>
        <ref name="skinconfig"/>
      </choice>
    </start>
  </grammar>
  
  
  
  1.1                  xml-forrest/src/resources/schema/relaxng/xslt.rng
  
  Index: xslt.rng
  ===================================================================
  <?xml version="1.0" encoding="iso-8859-1"?>
  <!-- $Id: xslt.rng,v 1.1 2002/11/07 06:37:02 crossley Exp $ -->
  <!-- This was mostly generated from the syntax summary in the XSLT
       Recommendation (using XSLT of course). -->
  <!-- Issues: this validates extension elements as literal result
       elements, which is overly restrictive. -->
  <grammar xmlns="http://relaxng.org/ns/structure/1.0"
           ns="http://www.w3.org/1999/XSL/Transform"
           datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
     <start>
        <choice>
           <ref name="stylesheet.element"/>
           <ref name="transform.element"/>
           <ref name="literal-result-element-as-stylesheet"/>
        </choice>
     </start>
     <define name="version">
        <value>1.0</value>
     </define>
     <define name="top-level-elements.model">
        <zeroOrMore>
           <choice>
              <ref name="top-level-element.category"/>
              <ref name="top-level-extension"/>
           </choice>
        </zeroOrMore>
     </define>
     <define name="top-level-extension">
        <element>
           <anyName>
              <except>
                 <nsName/>
                 <nsName ns=""/>
              </except>
           </anyName>
           <grammar>
              <start>
                <ref name="any"/>
              </start>
              <define name="any">
  	       <zeroOrMore>
  		  <choice>
  		     <attribute>
  			<anyName/>
  		     </attribute>
  		     <text/>
  		     <element>
  			<anyName/>
  			<ref name="any"/>
  		     </element>
  		  </choice>
  	       </zeroOrMore>
              </define>
           </grammar>
        </element>
     </define>
     <define name="template.model">
        <zeroOrMore>
           <choice>
              <ref name="instruction.category"/>
              <ref name="literal-result-element"/>
              <text/>
           </choice>
        </zeroOrMore>
     </define>
     <define name="literal-result-element-as-stylesheet">
        <element>
           <anyName>
              <except>
                 <nsName/>
              </except>
           </anyName>
           <attribute>
              <name>version</name>
              <ref name="version"/>
           </attribute>
           <ref name="literal-result-element-no-version.atts"/>
           <ref name="template.model"/>
        </element>
     </define>
     <define name="literal-result-element">
        <element>
           <anyName>
              <except>
                 <nsName/>
              </except>
           </anyName>
           <ref name="literal-result-element.atts"/>
           <ref name="template.model"/>
        </element>
     </define>
     <define name="literal-result-element.atts">
        <ref name="literal-result-element-no-version.atts"/>
        <optional>
  	 <attribute>
  	    <name>version</name>
  	    <ref name="version"/>
  	 </attribute>
        </optional>
     </define>
     <define name="literal-result-element-no-version.atts">
        <zeroOrMore>
           <choice>
              <attribute>
  	       <anyName>
  		  <except>
  		     <nsName/>
  		  </except>
  	       </anyName>
                 <ref name="avt.datatype"/>
              </attribute>
              <attribute>
                 <name>extension-element-prefixes</name>
                 <ref name="prefixes.datatype"/>
  	    </attribute>
              <attribute>
                 <name>exclude-result-prefixes</name>
                 <ref name="prefixes.datatype"/>
  	    </attribute>
              <attribute>
                 <name>use-attribute-sets</name>
                 <ref name="qnames.datatype"/>
              </attribute>
           </choice>
        </zeroOrMore>
     </define>
     <define name="top-level-element.category">
        <choice>
           <ref name="include.element"/>
           <ref name="strip-space.element"/>
           <ref name="preserve-space.element"/>
           <ref name="template.element"/>
           <ref name="namespace-alias.element"/>
           <ref name="attribute-set.element"/>
           <ref name="variable.element"/>
           <ref name="param.element"/>
           <ref name="key.element"/>
           <ref name="decimal-format.element"/>
           <ref name="output.element"/>
        </choice>
     </define>
     <define name="instruction.category">
        <choice>
           <ref name="apply-templates.element"/>
           <ref name="apply-imports.element"/>
           <ref name="call-template.element"/>
           <ref name="element.element"/>
           <ref name="attribute.element"/>
           <ref name="text.element"/>
           <ref name="processing-instruction.element"/>
           <ref name="comment.element"/>
           <ref name="copy.element"/>
           <ref name="value-of.element"/>
           <ref name="number.element"/>
           <ref name="for-each.element"/>
           <ref name="if.element"/>
           <ref name="choose.element"/>
           <ref name="variable.element"/>
           <ref name="copy-of.element"/>
           <ref name="message.element"/>
           <ref name="fallback.element"/>
        </choice>
     </define>
     <define name="extension.atts">
        <zeroOrMore>
           <attribute>
              <anyName>
                 <except>
                    <nsName/>
                    <nsName ns=""/>
                 </except>
              </anyName>
           </attribute>
        </zeroOrMore>
     </define>
     <define name="stylesheet.element">
        <element name="stylesheet">
           <ref name="stylesheet.model"/>
        </element>
     </define>
     <define name="transform.element">
        <element name="transform">
           <ref name="stylesheet.model"/>
        </element>
     </define>
     <define name="stylesheet.model">
        <ref name="extension.atts"/>
        <optional>
  	 <attribute name="id">
  	    <data type="NCName"/>
  	 </attribute>
        </optional>
        <optional>
  	 <attribute name="extension-element-prefixes">
              <ref name="prefixes.datatype"/>
  	 </attribute>
        </optional>
        <optional>
  	 <attribute name="exclude-result-prefixes">
              <ref name="prefixes.datatype"/>
  	 </attribute>
        </optional>
        <attribute name="version">
  	 <ref name="version"/>
        </attribute>
        <group>
  	 <zeroOrMore>
  	    <ref name="import.element"/>
  	 </zeroOrMore>
  	 <ref name="top-level-elements.model"/>
        </group>
     </define>
     <define name="include.element">
        <element name="include">
           <ref name="extension.atts"/>
           <attribute name="href">
              <data type="anyURI"/>
           </attribute>
        </element>
     </define>
     <define name="import.element">
        <element name="import">
           <ref name="extension.atts"/>
           <attribute name="href">
              <data type="anyURI"/>
           </attribute>
        </element>
     </define>
     <define name="strip-space.element">
        <element name="strip-space">
           <ref name="extension.atts"/>
           <attribute name="elements">
              <ref name="wildcards.datatype"/>
           </attribute>
        </element>
     </define>
     <define name="preserve-space.element">
        <element name="preserve-space">
           <ref name="extension.atts"/>
           <attribute name="elements">
              <ref name="wildcards.datatype"/>
           </attribute>
        </element>
     </define>
     <define name="template.element">
        <element name="template">
           <ref name="extension.atts"/>
           <optional>
              <attribute name="match">
                 <ref name="pattern.datatype"/>
              </attribute>
           </optional>
           <optional>
              <attribute name="name">
                 <ref name="qname.datatype"/>
              </attribute>
           </optional>
           <optional>
              <attribute name="priority">
                 <ref name="number.datatype"/>
              </attribute>
           </optional>
           <optional>
              <attribute name="mode">
                 <ref name="qname.datatype"/>
              </attribute>
           </optional>
           <group>
              <zeroOrMore>
                 <ref name="param.element"/>
              </zeroOrMore>
              <ref name="template.model"/>
           </group>
        </element>
     </define>
     <define name="apply-templates.element">
        <element name="apply-templates">
           <ref name="extension.atts"/>
           <optional>
              <attribute name="select">
                 <ref name="expression.datatype"/>
              </attribute>
           </optional>
           <optional>
              <attribute name="mode">
                 <ref name="qname.datatype"/>
              </attribute>
           </optional>
           <zeroOrMore>
              <choice>
                 <ref name="sort.element"/>
                 <ref name="with-param.element"/>
              </choice>
           </zeroOrMore>
        </element>
     </define>
     <define name="apply-imports.element">
        <element name="apply-imports">
           <ref name="extension.atts"/>
        </element>
     </define>
     <define name="call-template.element">
        <element name="call-template">
           <ref name="extension.atts"/>
           <attribute name="name">
              <ref name="qname.datatype"/>
           </attribute>
           <zeroOrMore>
              <ref name="with-param.element"/>
           </zeroOrMore>
        </element>
     </define>
     <define name="namespace-alias.element">
        <element name="namespace-alias">
           <ref name="extension.atts"/>
           <attribute name="stylesheet-prefix">
              <ref name="prefix.datatype"/>
           </attribute>
           <attribute name="result-prefix">
              <ref name="prefix.datatype"/>
           </attribute>
        </element>
     </define>
     <define name="element.element">
        <element name="element">
           <ref name="extension.atts"/>
           <attribute name="name">
              <choice>
                 <ref name="qname.datatype"/>
                 <ref name="expr-avt.datatype"/>
              </choice>
           </attribute>
           <optional>
              <attribute name="namespace">
                 <choice>
                    <data type="anyURI"/>
                    <ref name="brace-avt.datatype"/>
                 </choice>
              </attribute>
           </optional>
           <optional>
              <attribute name="use-attribute-sets">
                 <ref name="qnames.datatype"/>
              </attribute>
           </optional>
           <ref name="template.model"/>
        </element>
     </define>
     <define name="attribute.element">
        <element name="attribute">
           <ref name="extension.atts"/>
           <attribute name="name">
              <choice>
                 <ref name="qname.datatype"/>
                 <ref name="expr-avt.datatype"/>
              </choice>
           </attribute>
           <optional>
              <attribute name="namespace">
                 <choice>
                    <data type="anyURI"/>
                    <ref name="brace-avt.datatype"/>
                 </choice>
              </attribute>
           </optional>
           <ref name="template.model"/>
        </element>
     </define>
     <define name="attribute-set.element">
        <element name="attribute-set">
           <ref name="extension.atts"/>
           <attribute name="name">
              <ref name="qname.datatype"/>
           </attribute>
           <optional>
              <attribute name="use-attribute-sets">
                 <ref name="qnames.datatype"/>
              </attribute>
           </optional>
           <zeroOrMore>
              <ref name="attribute.element"/>
           </zeroOrMore>
        </element>
     </define>
     <define name="text.element">
        <element name="text">
           <ref name="extension.atts"/>
           <optional>
              <attribute name="disable-output-escaping">
                 <choice>
                    <value type="string">yes</value>
                    <value type="string">no</value>
                 </choice>
              </attribute>
           </optional>
           <text/>
        </element>
     </define>
     <define name="processing-instruction.element">
        <element name="processing-instruction">
           <ref name="extension.atts"/>
           <attribute name="name">
              <choice>
                 <data type="NCName"/>
                 <ref name="expr-avt.datatype"/>
              </choice>
           </attribute>
           <ref name="template.model"/>
        </element>
     </define>
     <define name="comment.element">
        <element name="comment">
           <ref name="extension.atts"/>
           <ref name="template.model"/>
        </element>
     </define>
     <define name="copy.element">
        <element name="copy">
           <ref name="extension.atts"/>
           <optional>
              <attribute name="use-attribute-sets">
                 <ref name="qnames.datatype"/>
              </attribute>
           </optional>
           <ref name="template.model"/>
        </element>
     </define>
     <define name="value-of.element">
        <element name="value-of">
           <ref name="extension.atts"/>
           <attribute name="select">
              <ref name="expression.datatype"/>
           </attribute>
           <optional>
              <attribute name="disable-output-escaping">
                 <choice>
                    <value type="string">yes</value>
                    <value type="string">no</value>
                 </choice>
              </attribute>
           </optional>
        </element>
     </define>
     <define name="number.element">
        <element name="number">
           <ref name="extension.atts"/>
           <optional>
              <attribute name="level">
                 <choice>
                    <value type="string">single</value>
                    <value type="string">multiple</value>
                    <value type="string">any</value>
                 </choice>
              </attribute>
           </optional>
           <optional>
              <attribute name="count">
                 <ref name="pattern.datatype"/>
              </attribute>
           </optional>
           <optional>
              <attribute name="from">
                 <ref name="pattern.datatype"/>
              </attribute>
           </optional>
           <optional>
              <attribute name="value">
                 <ref name="expression.datatype"/>
              </attribute>
           </optional>
           <optional>
              <attribute name="format">
                 <ref name="avt.datatype"/>
              </attribute>
           </optional>
           <optional>
              <attribute name="lang">
                 <choice>
                    <data type="NMTOKEN"/>
                    <ref name="expr-avt.datatype"/>
                 </choice>
              </attribute>
           </optional>
           <optional>
              <attribute name="letter-value">
  	       <choice>
  		  <value type="string">alphabetic</value>
  		  <value type="string">traditional</value>
  		  <ref name="expr-avt.datatype"/>
  	       </choice>
              </attribute>
           </optional>
           <optional>
              <attribute name="grouping-separator">
                 <choice>
                    <ref name="char.datatype"/>
                    <ref name="expr-avt.datatype"/>
                 </choice>
              </attribute>
           </optional>
           <optional>
              <attribute name="grouping-size">
                 <choice>
                    <ref name="number.datatype"/>
                    <ref name="expr-avt.datatype"/>
                 </choice>
              </attribute>
           </optional>
        </element>
     </define>
     <define name="for-each.element">
        <element name="for-each">
           <ref name="extension.atts"/>
           <attribute name="select">
              <ref name="expression.datatype"/>
           </attribute>
           <group>
              <zeroOrMore>
                 <ref name="sort.element"/>
              </zeroOrMore>
              <ref name="template.model"/>
           </group>
        </element>
     </define>
     <define name="if.element">
        <element name="if">
           <ref name="extension.atts"/>
           <attribute name="test">
              <ref name="expression.datatype"/>
           </attribute>
           <ref name="template.model"/>
        </element>
     </define>
     <define name="choose.element">
        <element name="choose">
           <ref name="extension.atts"/>
           <group>
              <oneOrMore>
                 <ref name="when.element"/>
              </oneOrMore>
              <optional>
                 <ref name="otherwise.element"/>
              </optional>
           </group>
        </element>
     </define>
     <define name="when.element">
        <element name="when">
           <ref name="extension.atts"/>
           <attribute name="test">
              <ref name="expression.datatype"/>
           </attribute>
           <ref name="template.model"/>
        </element>
     </define>
     <define name="otherwise.element">
        <element name="otherwise">
           <ref name="extension.atts"/>
           <ref name="template.model"/>
        </element>
     </define>
     <define name="sort.element">
        <element name="sort">
           <ref name="extension.atts"/>
           <optional>
              <attribute name="select">
                 <ref name="expression.datatype"/>
              </attribute>
           </optional>
           <optional>
              <attribute name="lang">
                 <choice>
                    <data type="NMTOKEN"/>
                    <ref name="expr-avt.datatype"/>
                 </choice>
              </attribute>
           </optional>
           <optional>
              <attribute name="data-type">
  	       <choice>
  		  <value type="string">text</value>
  		  <value type="string">number</value>
  		  <ref name="qname-but-not-ncname.datatype"/>
  		  <ref name="expr-avt.datatype"/>
  	       </choice>
              </attribute>
           </optional>
           <optional>
              <attribute name="order">
  	       <choice>
  		  <value type="string">ascending</value>
  		  <value type="string">descending</value>
  		  <ref name="expr-avt.datatype"/>
  	       </choice>
              </attribute>
           </optional>
           <optional>
              <attribute name="case-order">
  	       <choice>
  		  <value type="string">upper-first</value>
  		  <value type="string">lower-first</value>
  		  <ref name="expr-avt.datatype"/>
  	       </choice>
              </attribute>
           </optional>
        </element>
     </define>
     <define name="variable.element">
        <element name="variable">
           <ref name="extension.atts"/>
           <attribute name="name">
              <ref name="qname.datatype"/>
           </attribute>
           <choice>
              <attribute name="select">
                 <ref name="expression.datatype"/>
              </attribute>
              <ref name="template.model"/>
           </choice>
        </element>
     </define>
     <define name="param.element">
        <element name="param">
           <ref name="extension.atts"/>
           <attribute name="name">
              <ref name="qname.datatype"/>
           </attribute>
           <choice>
              <attribute name="select">
                 <ref name="expression.datatype"/>
              </attribute>
              <ref name="template.model"/>
           </choice>
        </element>
     </define>
     <define name="copy-of.element">
        <element name="copy-of">
           <ref name="extension.atts"/>
           <attribute name="select">
              <ref name="expression.datatype"/>
           </attribute>
        </element>
     </define>
     <define name="with-param.element">
        <element name="with-param">
           <ref name="extension.atts"/>
           <attribute name="name">
              <ref name="qname.datatype"/>
           </attribute>
           <choice>
              <attribute name="select">
                 <ref name="expression.datatype"/>
              </attribute>
              <ref name="template.model"/>
           </choice>
        </element>
     </define>
     <define name="key.element">
        <element name="key">
           <ref name="extension.atts"/>
           <attribute name="name">
              <ref name="qname.datatype"/>
           </attribute>
           <attribute name="match">
              <ref name="pattern.datatype"/>
           </attribute>
           <attribute name="use">
              <ref name="expression.datatype"/>
           </attribute>
        </element>
     </define>
     <define name="decimal-format.element">
        <element name="decimal-format">
           <ref name="extension.atts"/>
           <optional>
              <attribute name="name">
                 <ref name="qname.datatype"/>
              </attribute>
           </optional>
           <optional>
              <attribute name="decimal-separator">
                 <ref name="char.datatype"/>
              </attribute>
           </optional>
           <optional>
              <attribute name="grouping-separator">
                 <ref name="char.datatype"/>
              </attribute>
           </optional>
           <optional>
              <attribute name="infinity">
                 <text/>
              </attribute>
           </optional>
           <optional>
              <attribute name="minus-sign">
                 <ref name="char.datatype"/>
              </attribute>
           </optional>
           <optional>
              <attribute name="NaN">
                 <text/>
              </attribute>
           </optional>
           <optional>
              <attribute name="percent">
                 <ref name="char.datatype"/>
              </attribute>
           </optional>
           <optional>
              <attribute name="per-mille">
                 <ref name="char.datatype"/>
              </attribute>
           </optional>
           <optional>
              <attribute name="zero-digit">
                 <ref name="char.datatype"/>
              </attribute>
           </optional>
           <optional>
              <attribute name="digit">
                 <ref name="char.datatype"/>
              </attribute>
           </optional>
           <optional>
              <attribute name="pattern-separator">
                 <ref name="char.datatype"/>
              </attribute>
           </optional>
        </element>
     </define>
     <define name="message.element">
        <element name="message">
           <ref name="extension.atts"/>
           <optional>
              <attribute name="terminate">
                 <choice>
                    <value type="string">yes</value>
                    <value type="string">no</value>
                 </choice>
              </attribute>
           </optional>
           <ref name="template.model"/>
        </element>
     </define>
     <define name="fallback.element">
        <element name="fallback">
           <ref name="extension.atts"/>
           <ref name="template.model"/>
        </element>
     </define>
     <define name="output.element">
        <element name="output">
           <ref name="extension.atts"/>
           <optional>
              <attribute name="method">
                 <choice>
                    <value type="string">xml</value>
                    <value type="string">html</value>
                    <value type="string">text</value>
                    <ref name="qname-but-not-ncname.datatype"/>
                 </choice>
              </attribute>
           </optional>
           <optional>
              <attribute name="version">
                 <data type="NMTOKEN"/>
              </attribute>
           </optional>
           <optional>
              <attribute name="encoding">
                 <text/>
              </attribute>
           </optional>
           <optional>
              <attribute name="omit-xml-declaration">
                 <choice>
                    <value type="string">yes</value>
                    <value type="string">no</value>
                 </choice>
              </attribute>
           </optional>
           <optional>
              <attribute name="standalone">
                 <choice>
                    <value type="string">yes</value>
                    <value type="string">no</value>
                 </choice>
              </attribute>
           </optional>
           <optional>
              <attribute name="doctype-public">
                 <text/>
              </attribute>
           </optional>
           <optional>
              <attribute name="doctype-system">
                 <text/>
              </attribute>
           </optional>
           <optional>
              <attribute name="cdata-section-elements">
                 <ref name="qnames.datatype"/>
              </attribute>
           </optional>
           <optional>
              <attribute name="indent">
                 <choice>
                    <value type="string">yes</value>
                    <value type="string">no</value>
                 </choice>
              </attribute>
           </optional>
           <optional>
              <attribute name="media-type">
                 <text/>
              </attribute>
           </optional>
        </element>
     </define>
     <define name="prefixes.datatype">
        <list>
           <zeroOrMore>
              <choice>
                 <data type="NCName"/>
                 <value>#default</value>
              </choice>
           </zeroOrMore>
        </list>
     </define>
     <define name="prefix.datatype">
        <choice>
  	 <data type="NCName"/>
  	 <value>#default</value>
        </choice>
     </define>
     <define name="wildcards.datatype">
        <list>
           <zeroOrMore>
  	    <choice>
  	       <data type="QName"/>
  	       <data type="token">
  		  <param name="pattern">\*|\i\c*:\*</param>
  	       </data>
  	    </choice>
           </zeroOrMore>
        </list> 
     </define>
     <define name="qname.datatype">
        <data type="QName"/>
     </define>
     <define name="qnames.datatype">
        <list>
           <zeroOrMore>
              <data type="QName"/>
           </zeroOrMore>
        </list>
     </define>
     <define name="char.datatype">
        <data type="string">
           <param name="length">1</param>
        </data>
     </define>
     <define name="number.datatype">
        <data type="decimal"/>
     </define>
     <define name="expression.datatype">
        <text/>
     </define>
     <define name="pattern.datatype">
        <text/>
     </define>
     <define name="qname-but-not-ncname.datatype">
        <data type="QName">
          <param name="pattern">.*:.*</param>
        </data>
     </define>
     <!-- An AVT containing at least one expression. -->
     <define name="expr-avt.datatype">
        <data type="string">
           <param name="pattern">([^\{\}]|\{\{|\}\})*\{([^&#34;'\{\}]|&#34;[^&#34;]*&#34;|'[^']*')+\}([^\{\}]|\{\{|\}\}|\{([^&#34;'\{\}]|&#34;[^&#34;]*&#34;|'[^']*')+\})*</param>
        </data>
     </define>
     <!-- An AVT containing at least one brace; ie where instantiated AVT
          is not the same as the literal AVT. -->
     <define name="brace-avt.datatype">
        <data type="string">
           <param name="pattern">[^\{\}]*(\{\{|\}\}|\{([^&#34;'\{\}]|&#34;[^&#34;]*&#34;|'[^']*')+\})([^\{\}]|\{\{|\}\}|\{([^&#34;'\{\}]|&#34;[^&#34;]*&#34;|'[^']*')+\})*</param>
        </data>
     </define>
     <define name="avt.datatype">
        <data type="string">
           <param name="pattern">([^\{\}]|\{\{|\}\}|\{([^&#34;'\{\}]|&#34;[^&#34;]*&#34;|'[^']*')+\})*</param>
        </data>
     </define>
  </grammar>
  
  
  
  1.1                  xml-forrest/src/resources/schema/relaxng/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/07 06:37:02 $
  Jeff Turner <jefft@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/relaxng/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/07 06:37:02 $
  # Jeff Turner <jefft@apache.org>
  
  # start = element * { any }
  
  any = attribute * { text }* |
        element * { any }*
  
  
  
  1.1                  xml-forrest/src/resources/schema/relaxng/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/relaxng/unstable/forrestbot.rnx
  
  Index: forrestbot.rnx
  ===================================================================
  # $Revision: 1.1 $ $Date: 2002/11/07 06:37:02 $
  # Jeff Turner <jefft@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 }*
                        }*
                      }
  
  
  

Mime
View raw message