On Mon, 2008-08-18 at 14:34 +0300, Sjur Moshagen wrote:
> >> To me it looks like the locationmap, when nothing is found, returns
> >> the path
> >> to the locationmap.xml file (excluding the filename), combined with
> >> the last
> >> part of the lm: specification in the sitemap: 'pdf.user-config}'
> >>
> >> An empty locationmap selection:
> >>
> >> <match pattern="pdf.user-config">
> >> <select>
> >> <location src="resources/fonts/config.xml"/>
> >> <location src=""/>
> >> </select>
> >> </match>
> >>
> >> returns the same bogus string as above.
> >>
> >> Anybody any clue about what is going on? How can I get the intended
> >> behaviour?
> >>
> >> Sjur
> >>
> >> [1] http://marc.info/?l=forrest-user&m=118525205328423&w=2
> >
> > Hi Sjur,
> > I mailed Cocoon about this[1] long ago and filed a bug[2] which says
> > it's now fixed. I reckon we'd need to update Cocoon to see if that's
> > true(I don't see any actual commits against it). I don't remember
> > much more than that unfortunately but I hope that helps.
> >
> > --tim
> >
> > [1] - http://marc.info/?t=111996379000002&r=1&w=2
> > [2] - https://issues.apache.org/jira/browse/COCOON-1542
>
> I believe it is a locationmap problem - it is the locationmap that is
> returning the string, somehow. I have also tested the following in the
> sitemap:
>
> <map:serializers default="fo2pdf">
> <map:serializer name="fo2pdf"
> src="org.apache.cocoon.blocks.fop.FOPNGSerializer" mime-
> type="application/pdf">
> <user-config></user-config>
> </map:serializer>
> </map:serializers>
>
> That is, with a completely *empty* <user-config> element. And this
> works - the FOPNGSerializer falls back to the defaults.
>
> And I'm sorry: I didn't test well enough - the problem arises even
> thoug there IS a matching config file. So there seems to be a problem
> with my locationmap definition?
>
> To sum up:
>
> 1. if the path is hardcoded in the sitemap, all is ok
> 2. if the path is empty in the sitemap, all is ok
> 3. if the path is looked up via lm, and a matching file is found(*),
> the path returned is garbage
> 4. if the path is looked up via lm, but no match is found, garbage is
> returned instead of the empty string
>
> Both 3. and 4. returns:
>
> /usr/local/forrest/build/plugins/org.apache.forrest.plugin.output.pdf/
> pdf.user-config}
do not pay much attention to what I recall but AFAIR the problem is that
in the map:config block of the sitemap you just cannot use input
modules.
You could try to define {properties:testing} and I guess that will not
returning anything either.
Sorry for not being a bigger help on this.
salu2
>
> (*) I don't *know* that the matching file is found, I'm just assuming
> here - how can I check that?
>
> Thanks for the help,
> Sjur
>
--
Thorsten Scherler thorsten.at.apache.org
Open Source Java consulting, training and solutions