Bruno,

> From: Bruno Dumon [mailto:[EMAIL PROTECTED]] 
> On Thu, 2002-06-06 at 18:34, Piroumian Konstantin wrote:
> [snip]
> > 
> > Please, try it and tell me what else can be added/improved 
> and patch it at
> > will.
> > 
> 
> Sorry for the late response, but hey, it's better late than 
> nothing :-)

And I've at last could take a look at issues you mention and hope I've
addressed all of them (the new version is committed), but there are some
comments, see below:

> 
> I tried out your schema with Xerces 2.01 on a sitemap I have 
> here (that
> works with cocoon 2.02).
> 
> Some errors I found in the schema:
> 
> * Additional configuration attributes and child elements on the
> component declarations are apparently not allowed by the schema.
> e.g. <map:transformer name="foo" src="a.b.c.d.FooImpl" 
> foo-factor="5"/>

Child elements were allowed, I don't know why did you get this error. And
I'm not sure that configuration attributes are allowed on component
declarations. 

Can anybody confirm/explain/answer: is having configuration attributes
really needed/used?

> 
> 
> * Giving parameters to a selector is not allowed by the schema:
> e.g.
>   <map:select>
>      <map:parameter name="foo" value="bar"/>
>      [...]
>   </map:select>
> 
> Also, with current sitemap implementations the parameters may be
> anywhere as long as they're a child of the parent element:
> 
> e.g.
> <map:select>
>   <map:parameter name="..." value="..."/>
>   <map:when ... </map:when>
>   <map:parameter name="..." value="..."/>
>   <map:when ... </map:when>
> </map:select>
> 
> Although this kind of usage should probably be discouraged ;-)

So, selector parameters are allowed now, but not <map:when> parameters to
prevent discouraged use ;)

> 
> 
> * Everywhere the data type xs:anyURI is required, this should 
> be removed
> because in the sitemap you may use {param} things in these attributes,
> and that are not valid URI's.
> e.g. <map:redirect-to uri="{page}"/>

Fixed.

> 
> Some missing attributes:
>  * src and set on map:act
>  * session on map:redirect-to
>  * language on map:mount
>  * strip-root and prefix on map:part

Fixed.

> 
>  * map:mount is a strange case: in the sitemap.xsl (C2.02) there is
> 'reload-method' attribute with values 'synchron' and 'asynchron',
> however that attribute is not used by the treeprocessor (as 
> far as I can
> see).

It's not used since 2.1 and that's the reason I omit it.  

> 
> 
> 
> Then some errors that are a consequence of trying to formalize the
> content model of the pipeline elements, which I have always 
> found quite
> difficult because just about any combination of elements is allowed.
> Here are some examples of what does not work:
> 
> * content starting with map:transform is not allowed by the 
> schema, e.g.
>         <map:pipeline>
>             <map:select>
>                 <map:when>
>                     <map:act type="hello">
>                         <map:generate/>
>                     </map:act>
>                     <map:transform type="x"/>
>                     <map:serialize/>
>                 </map:when>
>             </map:select>
>         </map:pipeline>
> 
> 
> * stuff before <map:redirect-to> is not allowed by the schema:
>         <map:pipeline>
>             <map:act/>
>             <map:redirect-to uri="http://www.somewhere.be"/>
>         </map:pipeline>
> 
> * A map:serialize on its own is not allowed by the schema:
> 
>         <map:pipeline>
>             <map:select>
>                 <map:when test="...">
>                     <map:generate/>
>                     <map:transform/>
>                 </map:when>
>             </map:select>
>             <map:serialize/>
>         </map:pipeline>

Fixed all the above.

> 
> 
> 
> Finally, here are the errors in the schema itself as reported 
> by Xerces:

I didn't yet touch most of the errors below yet. Some of them are caused by
wrong usage of type inheritance by restriction and some refactoring will be
needed. 

Regards,
  Konstantin

> 
> [Error] sitemap-2.1-draft.xsd:308:41: Error:  The child 
> 'choice' of the
> named group definition 'indirectComponents' must not specify 
> either the
> minOccurs or maxOccurs attribute.
> [Error] sitemap-2.1-draft.xsd:205:76: p-props-correct.2.1: 
> {min occurs}
> = '1' must not be greater than {max occurs} = '0' for 'group'.
> [Error] sitemap-2.1-draft.xsd:206:77: p-props-correct.2.1: 
> {min occurs}
> = '1' must not be greater than {max occurs} = '0' for 'group'.
> [Error] sitemap-2.1-draft.xsd:204:28: derivation-ok-restriction.5.2:
> Error for type 'noGenerationPipelineType'.  The content type of this
> type is empty, but the content type of the base is not.
> [Error] sitemap-2.1-draft.xsd:190:30: cos-ct-extends.1.4.2.2.2.2.1:
> Error for type 'viewType'.  The content type of a derived 
> type and that
> of its base must both be mixed or element-only.
> [Error] sitemap-2.1-draft.xsd:359:30: cos-ct-extends.1.4.2.2.2.2.1:
> Error for type 'handle-errorsType'.  The content type of a 
> derived type
> and that of its base must both be mixed or element-only.
> [Error] sitemap-2.1-draft.xsd:330:49: s4s-att-not-allowed: Attribute
> 'name' cannot appear in element 'complexType'.
> [Error] sitemap-2.1-draft.xsd:421:33: cos-nonambig:
> ("http://apache.org/cocoon/sitemap/1.0":call) and
> ("http://apache.org/cocoon/sitemap/1.0":call){0-UNBOUNDED} 
> (or elements
> from their substitution group) violate "Unique Particle Attribution".
> [Error] sitemap-2.1-draft.xsd:393:41: cos-nonambig:
> ("http://apache.org/cocoon/sitemap/1.0":call) and
> ("http://apache.org/cocoon/sitemap/1.0":call){0-UNBOUNDED} 
> (or elements
> from their substitution group) violate "Unique Particle Attribution".
> [Error] sitemap-2.1-draft.xsd:373:38: cos-nonambig:
> ("http://apache.org/cocoon/sitemap/1.0":call) and
> ("http://apache.org/cocoon/sitemap/1.0":call){0-UNBOUNDED} 
> (or elements
> from their substitution group) violate "Unique Particle Attribution".
> [Error] sitemap-2.1-draft.xsd:317:36: cos-nonambig:
> ("http://apache.org/cocoon/sitemap/1.0":parameter){0-UNBOUNDED} and
> ("http://apache.org/cocoon/sitemap/1.0":parameter){0-UNBOUNDED} (or
> elements from their substitution group) violate "Unique Particle
> Attribution".
> [Error] sitemap-2.1-draft.xsd:201:53: 
> cos-particle-restrict.2: Forbidden
> particle restriction:  'any:choice,sequence,all,elt'.
> [Error] sitemap-2.1-draft.xsd:201:53: derivation-ok-restriction.5.3:
> Error for type 'noGenerationPipelineType'.  The particle of 
> the type is
> not a valid restriction of the particle of the base.
> [Error] sitemap-2.1-draft.xsd:173:41: cos-nonambig:
> ("http://apache.org/cocoon/sitemap/1.0":call) and
> ("http://apache.org/cocoon/sitemap/1.0":call){0-UNBOUNDED} 
> (or elements
> from their substitution group) violate "Unique Particle Attribution".
> [Error] sitemap-2.1-draft.xsd:243:48: cos-nonambig:
> ("http://apache.org/cocoon/sitemap/1.0":call) and
> ("http://apache.org/cocoon/sitemap/1.0":call){0-UNBOUNDED} 
> (or elements
> from their substitution group) violate "Unique Particle Attribution".
> 
> 
> That's all.
> 
> I'm not an xml schema guru myself (who is?), but maybe 
> someone else can
> do something usefull with this.
> 
> --
> Bruno Dumon
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, email: [EMAIL PROTECTED]
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to