cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From h...@apache.org
Subject cvs commit: xml-cocoon2/src/webapp/WEB-INF/entities sitemap-v06.rng
Date Mon, 03 Feb 2003 09:36:02 GMT
haul        2003/02/03 01:36:02

  Modified:    src/webapp/WEB-INF/entities sitemap-v06.rng
  Log:
  include recent validation errors
  
  Revision  Changes    Path
  1.6       +103 -75   xml-cocoon2/src/webapp/WEB-INF/entities/sitemap-v06.rng
  
  Index: sitemap-v06.rng
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/webapp/WEB-INF/entities/sitemap-v06.rng,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- sitemap-v06.rng	17 Jan 2003 11:33:51 -0000	1.5
  +++ sitemap-v06.rng	3 Feb 2003 09:36:02 -0000	1.6
  @@ -1,6 +1,6 @@
   <?xml version="1.0" encoding="UTF-8"?>
   <grammar datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes" 
  -	 xmlns:sch="http://www.ascc.net/xml/schematron"
  +         xmlns:sch="http://www.ascc.net/xml/schematron"
            xmlns="http://relaxng.org/ns/structure/1.0" 
            xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" 
            xmlns:map="http://apache.org/cocoon/sitemap/1.0">
  @@ -95,12 +95,12 @@
       <optional>
         <attribute name="default">
           <data type="string" /> 
  -	<!-- CPA: in fact the default must always match the name attribute
  -	of one of it's child elements. We will rely on a schematron schema to check
  -	this (we cannot use ID/IDREF as there are multiple namespaces
  -	e.g. map:generator uses a different namespace to
  -	map:transformer) - NO - can't be done due to sitemap
  -	  inheritance -->
  +    	  <!-- CPA: in fact the default must always match the name attribute
  +    	  of one of it's child elements. We will rely on a schematron schema to check
  +    	  this (we cannot use ID/IDREF as there are multiple namespaces
  +    	  e.g. map:generator uses a different namespace to
  +    	  map:transformer) - NO - can't be done due to sitemap
  +    	  inheritance -->
         </attribute>
       </optional>
     </define>
  @@ -318,6 +318,15 @@
       <optional><element name="system"><text/></element></optional>
     </define>
   
  +  <define name="simpleFormExtractTransformer.contents">
  +    <optional>
  +       <element name="output">
  +          <ref name="name.attr"/>
  +          <text/>
  +       </element>
  +    </optional>
  +  </define>
  +
   <!-- CPA: contents confirmed by inspection of AbstractTextSerializer.java -->
     <define name="textSerializer.contents">
       <optional><ref name="cdata-section-elements"/></optional>
  @@ -332,6 +341,18 @@
       <optional><ref name="version"/></optional>
     </define>
   
  +  <define name="svg2jpegSerializer.contents">
  +    <optional>
  +       <element name="parameter">
  +          <attribute name="name"/>
  +          <attribute name="type">
  +            <value type="string">float</value>
  +          </attribute>
  +          <attribute name="value"/>
  +       </element>
  +    </optional>
  +  </define>
  +
   <!-- =============================================================== -->
   <!-- Sitemap -->
   <!-- =============================================================== -->
  @@ -459,12 +480,13 @@
       <element name="map:transformer">
         <ref name="map.transformer.attlist"/>
           <interleave>
  -	  <ref name="traxTransformer.contents"/>
  +          <ref name="traxTransformer.contents"/>
             <ref name="xsltTransformer.contents"/>
             <ref name="i18nTransformer.contents"/>
             <ref name="encodeURLTransformer.contents"/>
             <ref name="linkRewriterTransformer.contents"/>
             <ref name="web3RfcTransformer.contents"/>
  +          <ref name="simpleFormExtractTransformer.contents"/>
             <optional><ref name="mapping"/></optional>
           </interleave>
       </element>
  @@ -593,7 +615,7 @@
     <define name="map.reader">
       <element name="map:reader">
         <ref name="map.reader.attlist"/>
  -      <empty/> <!-- RNG: does reader ever have children? Its peers do. -->
  +      <optional><ref name="database.reader.content"/></optional>
       </element>
     </define>
     <define name="map.reader.attlist" combine="interleave">
  @@ -603,6 +625,11 @@
       <ref name="component.attr"/>
     </define>
   
  +  <define name="database.reader.content">
  +     <!-- FIXME is this complete ? -->
  +     <optional><element name="use-connection"><data type="string"/></element></optional>
  +  </define>
  +
   <!-- Serializers ======================================= -->
     <define name="map.serializers">
       <element name="map:serializers">
  @@ -613,8 +640,8 @@
       </element>
       <sch:pattern name="Test constraints on map:serialize">
         <sch:rule context="xmap:serialize">
  -	<sch:assert test="count(following-sibling::*[not(self::xmap:handle-errors)])=0">
  -	  map:serialize must be the last element in a pipeline (other than map:handle-errors).
  +    	<sch:assert test="count(following-sibling::*[not(self::xmap:handle-errors)])=0">
  +    	  map:serialize must be the last element in a pipeline (other than map:handle-errors).
           </sch:assert>
         </sch:rule>
       </sch:pattern>
  @@ -630,6 +657,7 @@
       <element name="map:serializer">
         <ref name="map.serializer.attlist"/>
         <optional><ref name="textSerializer.contents"/></optional>
  +      <optional><ref name="svg2jpegSerializer.contents"/></optional>
         <optional><ref name="set-content-length"/></optional>
         <optional><ref name="buffer-size"/></optional>
         <optional><ref name="user-config"/></optional>
  @@ -821,10 +849,10 @@
       <zeroOrMore>
         <choice>
           <attribute>
  -	  <anyName/>
  -	</attribute>
  -	<text/>
  -	<ref name="anyElement"/>
  +    	  <anyName/>
  +    	</attribute>
  +        <text/>
  +        <ref name="anyElement"/>
         </choice>
       </zeroOrMore>
     </element>
  @@ -905,7 +933,7 @@
     <define name="input-module">
       <element name="input-module">
         <ref name="input-module.attlist"/>
  -      <data type="string" />
  +      <zeroOrMore><ref name="anyElement"/></zeroOrMore>
       </element>
     </define>
     <define name="input-module.attlist" combine="interleave">
  @@ -1136,39 +1164,39 @@
         <!-- Schematron rules for map:pipeline follow -->
   
         <sch:pattern name="Test constraints on map:pipeline">
  -	<sch:rule context="/xmap:sitemap/xmap:pipelines/xmap:pipeline">
  -	  <sch:assert test="(@src and @name) 
  -	                     or .//xmap:generate[not(ancestor::xmap:handle-errors)]
  -	                     or .//xmap:aggregate[not(ancestor::xmap:handle-errors)]
  -	                     or .//xmap:read[not(ancestor::xmap:handle-errors)]
  -	                     or .//xmap:mount[not(ancestor::xmap:handle-errors)]
  -	                     or .//xmap:redirect-to[not(ancestor::xmap:handle-errors)]
  -	                     or .//xmap:call[not(ancestor::xmap:handle-errors)]">
  -	    Pipeline with no map:generate|aggregate|act|mount|redirect-to|call, or src and name
attributes, is illegal
  -	  </sch:assert>
  -	  <sch:assert test="not(.//*[namespace-uri()=namespace-uri(/xmap:sitemap)
  -	                         and (local-name()='generate' or local-name()='aggregate' or local-name()='transform')
  -			         and not(ancestor::xmap:handle-errors)])
  -                            or .//*[namespace-uri()=namespace-uri(/xmap:sitemap)
  -	                         and (local-name()='generate' or local-name()='aggregate' or local-name()='transform')
  -			         and not(ancestor::xmap:handle-errors)]
  -                                   [following::*[namespace-uri()=namespace-uri(/xmap:sitemap)
  -                                                       and (local-name()='serialize' or
local-name()='call')
  -                                                       and not(ancestor::xmap:handle-errors)
  -                                                ]/ancestor::xmap:pipeline[. = current()]
  -                                   ]">
  -	    Pipeline with map:generate|aggregate|transform must have map:serialize or map:call
  -	  </sch:assert>
  -	</sch:rule>
  -
  -	<sch:rule context="/xmap:sitemap/xmap:pipelines/xmap:pipeline//*[namespace-uri()=namespace-uri(/xmap:sitemap)
  -                           and (local-name()='serialize' or local-name()='mount'  or local-name()='read'
 
  -                                or local-name()='redirect-to' or local-name()='call') ]">
  -	  <sch:assert test="count(following-sibling::*[namespace-uri()=namespace-uri(/xmap:sitemap)

  -               and local-name() != 'handle-errors'])=0">
  -	    Pipeline with component after map:serialize|read|mount|redirect-to|call is illegal

  -	  </sch:assert>
  -	</sch:rule>
  +    	 <sch:rule context="/xmap:sitemap/xmap:pipelines/xmap:pipeline">
  +    	   <sch:assert test="(@src and @name) 
  +    	                      or .//xmap:generate[not(ancestor::xmap:handle-errors)]
  +    	                      or .//xmap:aggregate[not(ancestor::xmap:handle-errors)]
  +    	                      or .//xmap:read[not(ancestor::xmap:handle-errors)]
  +    	                      or .//xmap:mount[not(ancestor::xmap:handle-errors)]
  +    	                      or .//xmap:redirect-to[not(ancestor::xmap:handle-errors)]
  +    	                      or .//xmap:call[not(ancestor::xmap:handle-errors)]">
  +    	     Pipeline with no map:generate|aggregate|act|mount|redirect-to|call, or src and
name attributes, is illegal
  +    	   </sch:assert>
  +    	   <sch:assert test="not(.//*[namespace-uri()=namespace-uri(/xmap:sitemap)
  +    	                        and (local-name()='generate' or local-name()='aggregate' or
local-name()='transform')
  +    	                        and not(ancestor::xmap:handle-errors)])
  +    	                     or .//*[namespace-uri()=namespace-uri(/xmap:sitemap)
  +    	                        and (local-name()='generate' or local-name()='aggregate' or
local-name()='transform')
  +    	                        and not(ancestor::xmap:handle-errors)]
  +    	                                [following::*[namespace-uri()=namespace-uri(/xmap:sitemap)
  +    	                                                    and (local-name()='serialize'
or local-name()='call')
  +    	                                                    and not(ancestor::xmap:handle-errors)
  +    	                                             ]/ancestor::xmap:pipeline[. = current()]
  +    	                                ]">
  +    	     Pipeline with map:generate|aggregate|transform must have map:serialize or map:call
  +    	   </sch:assert>
  +    	 </sch:rule>
  +
  +    	 <sch:rule context="/xmap:sitemap/xmap:pipelines/xmap:pipeline//*[namespace-uri()=namespace-uri(/xmap:sitemap)
  +    	                        and (local-name()='serialize' or local-name()='mount'  or
local-name()='read'  
  +    	                             or local-name()='redirect-to' or local-name()='call')
]">
  +    	   <sch:assert test="count(following-sibling::*[namespace-uri()=namespace-uri(/xmap:sitemap)

  +    	            and local-name() != 'handle-errors'])=0">
  +    	     Pipeline with component after map:serialize|read|mount|redirect-to|call is illegal

  +    	   </sch:assert>
  +    	 </sch:rule>
         </sch:pattern>
       </element>
     </define>
  @@ -1213,17 +1241,17 @@
         </optional>
       </element>
         <sch:pattern name="Test constraints on map:match and map:select">
  -	<sch:rule context="xmap:match|xmap:when|xmap:otherwise[*]">
  -	  <sch:assert test="*[namespace-uri()=namespace-uri(/xmap:sitemap)
  -	                         and (local-name()='generate' or local-name()='transform'
  -	                           or local-name()='serialize' or local-name()='aggregate'
  -	                           or local-name()='read' or local-name()='redirect-to'
  -	                           or local-name()='act' or local-name()='match' or local-name()='select'

  -	                           or local-name()='mount' or local-name()='call')
  -			     ]">
  -	    map:match|select without direct components, or map:mount|redirect-to|call|act|match|select
is illegal
  -	  </sch:assert>
  -	</sch:rule>
  +    	 <sch:rule context="xmap:match|xmap:when|xmap:otherwise[*]">
  +    	   <sch:assert test="*[namespace-uri()=namespace-uri(/xmap:sitemap)
  +    	                          and (local-name()='generate' or local-name()='transform'
  +    	                            or local-name()='serialize' or local-name()='aggregate'
  +    	                            or local-name()='read' or local-name()='redirect-to'
  +    	                            or local-name()='act' or local-name()='match' or local-name()='select'

  +    	                            or local-name()='mount' or local-name()='call')
  +    	              ]">
  +    	     map:match|select without direct components, or map:mount|redirect-to|call|act|match|select
is illegal
  +    	   </sch:assert>
  +    	 </sch:rule>
         </sch:pattern>
     </define>
     <define name="map.select.attlist" combine="interleave">
  @@ -1421,21 +1449,21 @@
         <ref name="pipe.contents"/>
       </element>
         <sch:pattern name="Test constraints on map:handle-errors">
  -	<sch:rule context="xmap:handle-errors">
  -	  <sch:assert test="not(*[namespace-uri()=namespace-uri(/xmap:sitemap) 
  -               and (local-name()='generate' or local-name()='mount')])">
  -	    Error handler can't have: map:generate or map:mount.
  -	  </sch:assert>
  -	  <sch:assert test="*[namespace-uri()=namespace-uri(/xmap:sitemap) 
  -               and (local-name()='serialize' or local-name()='call')]">
  -	    Error handler must have map:serialize or map:call.
  -	  </sch:assert>
  -	</sch:rule>
  -	<sch:rule context="xmap:handle-errors//xmap:serialize">
  -	  <sch:assert test="not(following-sibling::*[namespace-uri()=namespace-uri(/xmap:sitemap)])">
  -	    Error handler can not have any components after map:serialize
  -	  </sch:assert>
  -	</sch:rule>
  +    	 <sch:rule context="xmap:handle-errors">
  +    	   <sch:assert test="not(*[namespace-uri()=namespace-uri(/xmap:sitemap) 
  +    	            and (local-name()='generate' or local-name()='mount')])">
  +    	     Error handler can't have: map:generate or map:mount.
  +    	   </sch:assert>
  +    	   <sch:assert test="*[namespace-uri()=namespace-uri(/xmap:sitemap) 
  +    	            and (local-name()='serialize' or local-name()='call')]">
  +    	     Error handler must have map:serialize or map:call.
  +    	   </sch:assert>
  +    	 </sch:rule>
  +    	 <sch:rule context="xmap:handle-errors//xmap:serialize">
  +    	   <sch:assert test="not(following-sibling::*[namespace-uri()=namespace-uri(/xmap:sitemap)])">
  +    	     Error handler can not have any components after map:serialize
  +    	   </sch:assert>
  +    	 </sch:rule>
         </sch:pattern>
     </define>
   
  
  
  

----------------------------------------------------------------------
In case of troubles, e-mail:     webmaster@xml.apache.org
To unsubscribe, e-mail:          cocoon-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-cvs-help@xml.apache.org


Mime
View raw message