You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Colin Paul Adams <co...@colina.demon.co.uk> on 2002/10/23 17:13:16 UTC

Invalid sitemap contents in lint/sitemap.xmap

Whilst I now have a sitemap DTD that validates all the existing
sitemaps, it doesn't fail all the examples of invalid pipelines in the
lint sitemap:

    <!-- Pipeline with no map:generate|read|mount|redirect-to|call is illegal
    <map:pipeline>
      <map:transform src="../../stylesheets/simple-xml2html.xsl"/>
      <map:serialize/>
    </map:pipeline>
    -->

But I am using a rather generous grammar for pipeline contents:
<!ENTITY % pipe.contents
   "(map:parameter|map:act|map:match|map:select|map:call|map:redirect-to|
     map:read|map:aggregate|map:generate|map:transform|map:serialize|map:mount)*">

which clearly does not fail this case. It would be good to establish
exactly what the rules are, but I'm finding it rather difficult to
formulate.

For instance a pipeline must start with: ??
 map:generate|read|mount|redirect-to|call|match|act ?

Is it worth trying to establish this? I think the rule must be rather
complex. For instance, if a pipeline starts with a match, then each
branch of the match must have the same start requirements as a
pipeline, yes? But if a pipeline starts with a generate, and the next
stage is a match (is this allowed) then the map branches could start
with a transform.

Again:

    <!-- Pipeline with map:generate|transform must have serialize
    <map:pipeline>
      <map:generate src="sitemap.xmap"/>
      <map:transform src="../../stylesheets/simple-xml2html.xsl"/>
    </map:pipeline>
    -->

validates, incorrectly. But is this necessarily invalid, in the
presence of views?

Again:

    <!-- Pipeline with component after map:serialize|read|mount|redirect-to|call is illegal
    <map:pipeline>
      <map:read mime-type="text/test" src="sitemap.xmap"/>
      <map:act type="request"/>
    </map:pipeline>
    -->

validates incorrectly. I think it will be much easier to express these
sort of restrictions in schematron than WXS or RelaxNG. DTD has no
chance.

In fact, nearly all of the invalid pipelines in lint are validated ok
by the DTD.
-- 
Colin Paul Adams
Preston Lancashire

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org