cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Grzegorz Kossakowski <>
Subject Re: New expression language usage
Date Sun, 27 Jan 2008 23:53:35 GMT
Reinhard Poetz pisze:
> can you help me with following (simple) pipeline:
> <map:pipeline>
>   <map:match pattern="matching/*">
>     <map:generate src="sax-pipeline/[???].xml"/>
>     <map:serialize type="xml"/>
>   </map:match>
> </map:pipeline>
> What do I have to put instead of [???] if I want ro refer to the first
> match of
> the wildcard matcher?

Oh gosh, you stumbled upon COCOON-2118[1] issue. Fortunately enough, at least COCOON-2117
resolved so we can find this value in ObjectModel. Using XPath it should be something like:

  all/sitemap[position() = last()]/*[name()='1']


  all/sitemap[position() = last()]/*[name()='$named$']/*[name()='1']

I don't remember if $named$ part is necessary. I must put here a BIG warning, I tested this
casually so this part of EL might have bugs.

Expressions above look quite nasty so I think we'll need to get map: language done pretty
(I think it should be easy)

If you can't make this work, write a IT for it and I'll have a look ASAP.

> hmm, they work for me. Nontheless, you can always run a single test from
> within
> your IDE.

I get something like this:

testSettingStatusCode(  Time elapsed: 0.037 sec
junit.framework.ComparisonFailure: expected:<10[30]> but was:<10[24]>
	at junit.framework.Assert.assertEquals(
	at junit.framework.Assert.assertEquals(

> they will be gone as soon as the spring-configurator and
> servlet-service-impl
> are released.



Grzegorz Kossakowski
Committer and PMC Member of Apache Cocoon

View raw message