cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vadim Gritsenko <>
Subject Re: Examples of invalid pipelines in lint sitemap
Date Thu, 14 Nov 2002 22:04:10 GMT
Colin Paul Adams wrote:

>>>>>>"Vadim" == Vadim Gritsenko <> writes:
>    Vadim> Colin, Please take a look at validation rules built into
>    Vadim> sitemap.xsl (cocoon_2_0_3_branch), I hope xsl code in there
>    Vadim> will clear up things for you.
>It helped a lot. I've incorporated quite a few of the XPath
>expressions there into the schematron rules.
>But there are still two anomalies left:
>   <!-- 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>
>   -->
>Now there are lots of examples of the use of map:read in the
>sitemap.xmap files in cocoon 2.1 source, and none of them have
>anything following them (bar this deliberate error), except in the
>XMLForm sitemap, where there is a map:serialize immediately following
>a map:read.

This is the problem with the xmlform example.

>So I don't know whether the rule stated above is in error, or the
>XMLForm sitemap.
>I tried looking for docs on readers - I can see none, other than the
>source code ( - that seems to suggest that the XMLForm
>example is wrong, but I could use clarification.

Reader is similar to serializer in the sence that sitemap processing 
stops after reaching it (same for mount, call, and redirect). This is 
similar to "return" in procedural language. And, if you have any 
instruction after "return", it is not reachable, and many compilers 
check for unreachable statements - as Cocoon sitemap engine does.

>In the next example, I added an extra match, to prevent invalidation
>by another rule.
>    <!-- map:match|select without direct components are illegal 

I would say this comment is not correct. Read "direct component or 
mount, redirect, call".


>    <map:pipeline>
>      <map:match pattern="oops">
>        <map:act type="request">
>          <map:parameter name="x" value="x"/>
>        </map:act>
>      </map:match>
>      <map:match pattern="ok">
>       <map:generate src="sitemap.xmap"/>
>      </map:match>
>      <map:serialize/>
>    </map:pipeline>
>    -->
>But in sitemap.xsl, I find the following comment:
>      direct -> generator, transformer, serializer, aggregator, reader
>      support -> action, matcher, selector, mount, redirect, call
>    -->
>Whereas there are lots of examples of map:match having only map:mount
>within. This seems to be right to me, but the two comments can then
>not both be right.

To unsubscribe, e-mail:
For additional commands, email:

View raw message