Gav.... wrote:
> > -----Original Message-----
> > From: Ross Gardler
> > Sent: Sunday, 2 April 2006 11:25 PM
> > To: [email protected]
> > Subject: Re: Glossary Plugin FOR-755 - was RE: [jira] Updated: (FOR-639)
> > define terminology for the various aspects of Dispatcher
> >
> > Gav.... wrote:
> > > Ross Wrote:-
> > >
> > >>Gav.... wrote:
> > >>
> >
> > ...
> >
> > >>
> > >>>A 'Forrest Run' also works fine and the site displays great, all pages
> > >>
> > >>work
> > >>
> > >>>fine Except the 'glossary.xml' test file which although displays,
> > >>
> > >>produces
> > >>
> > >>>no content, just the menus and tabs etc..
> >
> > ...
> >
> > >>1) request the XML source of the document, this should be an XDoc. If it
> > >>is not then it means the plugin is not intercepting and processing the
> > >>request.
> > >
> > >
> > > Just looks like xml to me,
> > >
> > > <glossary>
> > > ???
> > > <part id="a">
> > > <title>A</title>
> >
> >
> > That confirms that the glossary plugin is not processing the XML file
> > with the glossary-to-document.xsl
I find it to be a sign that the input.xmap is
not correct.
> > >>2) do "forrest run" then look in PLUGIN_HOME/build/webapp/logs/ to see
> > >>if there are any errors, in particular check that the
> > >>glossary-to-document.xsl is being found, and if not, why not
> > >
> > > Amongst other things there is in the Locationmap.log :-
Be careful looking at the logs until you understand
more about how the sitemap works.
> > > ERROR [core.modules.mapper.lm] (/glossary.xml): Ignoring locationmap
> > config exception: Unable to build LocationMap.
> > >
> > > Caused by: org.apache.cocoon.ResourceNotFoundException: Resource not
> > found.
> > > at <map:serialize type="xml"> -
> > file:/D:/Apache2/forrest/main/webapp/sitemap.xmap:398:37
> > >
> > > Caused by: java.io.FileNotFoundException:
> > D:\Apache2\forrest\whiteboard\plugins\org.apache.forrest.plugin.input.glos
> > sary\src\documentation\content\locationmap.xml (The system cannot find the
> > file specified)
> >
> > Not a problem. This should really be reported as a warning not an error.
> > There is an issue for this.
> >
> > Not sure what the problem is, can you post the part of your input.xmap
> > that you believe should be processing the glossary.xml to produce the
> > xdoc from it.
Your input.xmap is missing the SourceTypeAction or perhaps
you just forgot to show us that bit. As suggested elsewhere,
your input.xmap should be very similar to listLocations/input.xmap
In fact you could throw away the glossary.xmap that Ross donated
and copy listLocations/input.xmap and change the obvious things.
There should be nothing more than what you have below
and the <map:components><map:actions> sections.
> I have :-
>
> <map:selectors default="parameter"><!-- was "browser" -->
> <map:selector logger="sitemap.selector.parameter" name="parameter"
> src="org.apache.cocoon.selection.ParameterSelector" />
> </map:selectors>
> </map:components>
>
> <map:resources>
> <map:resource name="transform-to-document">
> <map:act type="sourcetype" src="{src}">
> <map:select type="parameter">
> <map:parameter name="parameter-selector-test" value="{sourcetype}"
> />
> <map:when test="glossary-v10">
> <map:generate type="file" src="{lm:project.{../../1}.xml}"/>
> <map:transform
> src="{lm:glossary.transform.glossary.document}"/><!-- Not sure about this -->
That is correct, similar to listLocations/input.xmap
> <map:serialize type="xml-document"/>
> <!-- was <map:transform
> src="{project:skins-dir}{forrest:skin}/xslt/xdoc/glossary-to-document.xsl"/>-->
> </map:when>
> <map:otherwise />
> </map:select>
> </map:act>
> </map:resource>
> </map:resources>
>
> ...
>
> <map:pipelines>
> <map:pipeline internal="true">
> <map:match pattern="**.xml">
> <map:call resource="transform-to-document">
> <map:parameter name="src" value="{lm:project.{1}.xml}" />
> </map:call>
> </map:match>
>
> </map:pipeline>
>
> </map:pipelines>
All of the above looks correct.
> > Also tell us where you have put the glossary-to-document.xsl file.
>
> In /resources/stylesheets/
Correct.
> Also, in the locationmap.xml I have added in :-
>
> <locator>
> <match pattern="glossary.transform.*.*">
> <location src="resources/stylesheets/{1}-to-{2}.xsl" />
> </match>
> </locator>
>
> Also, while I am checking things, the top of glossary.xml looks like :-
>
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE glossary PUBLIC "-//Apache Forrest//DTD Glossary V1.0//EN"
> "glossary-v10.dtd">
> <!-- possibly "document" -->
> <glossary>
> <part id="a">
> <title>A</title
>
> I wasn???t sure if it was DOCTYPE glossary or DOCTYPE document, I have tried
> both at some stage.
What you have is correct, as long as that Public Identifier
matches the sourcetype/action defined in your input.xmap
-David