Colin Paul Adams wrote:
"Vadim" == Vadim Gritsenko <[EMAIL PROTECTED]> 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.
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.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 (Reader.java) - that seems to suggest that the XMLForm example is wrong, but I could use clarification.
In the next example, I added an extra match, to prevent invalidationI would say this comment is not correct. Read "direct component or mount, redirect, call".
by another rule.
<!-- map:match|select without direct components are illegal
Vadim
<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: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]