On Jan 14, 2004, at 5:19 PM, Joerg Heinicke wrote:
On 15.01.2004 01:56, Mark Lundquist wrote:
<map:match pattern="*/foo"> <map:aggregate element="foo"> <map:part src="foo.xml" /> </map:aggregate> <map:match pattern="bar/foo"> <map:aggregate element="bar"> <map:part src="bar.xml" /> </map:aggregate> </map:match> </map:match>
It's not possible in this way. <map:aggregate> is the generator and you can not add the stuff step by step.
OK — got it. I was thrown off by the guy who answered "yes" to my question (but then maybe my original question wasn't clear to him :-)
What you are trying to do is to add bar.xml only when bar/foo is matched, but foo.xml always?
Sort of — the test code I gave you is all about figuring out how <map:aggregate> works or doesn't work. It has nothing to do with my real problem :-)
In my real application there would have been two consecutive inner matchers nested within the outer matcher, and one or the other of them always matches (a design invariant — and this is in an internal-only pipeline). It would have been better to use a selector rather than the two inner matchers (but I'm new at this game! :-). Really, it's just that I have two pipelines that both start by aggregating a few of the same things, and all I wanted to do is to factor the common stuff. I'm sure the canonical way to do that is to factor the common stuff into its own pipeline, and then pull that into each of the downstream pipes with "cocoon:/" in their generators. But then I just had this thought that if aggregate worked in the way I thought it might, it would let me do the factoring in a way we be both clearer and more concise.
You are to much programming in the sitemap, but the sitemap is declarative.
Maybe so. OTOH, to me actions seem much more like "programming in the sitemap" than what I was trying to do. I think the example I gave made it look more like "programming in the sitemap" than what I really want :-). So, the semantics of <map:aggregate> are thoroughly generator-like... what I had in mind would have meant that they would be somewhat "transformer-like" as well, but would that have made the sitemap less "declarative"?
Anyway, thanks for all the help!
Best Regards ~ML
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]