forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gav...." <brightoncomput...@brightontown.com.au>
Subject RE: Glossary Plugin FOR-755 - was RE: [jira] Updated: (FOR-639) define terminology for the various aspects of Dispatcher
Date Mon, 03 Apr 2006 07:47:28 GMT

David wrote :-

> 
> Gav.... wrote:
> > > -----Original Message-----
> > > From: Ross Gardler
> > > Sent: Sunday, 2 April 2006 11:25 PM
> > > To: dev@forrest.apache.org
> > > Subject: Re: Glossary Plugin FOR-755 - was RE: [jira] Updated: (FOR-
> > > ...
> > >
> > > >>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.

Ok, I was just posting what I thought to be relevant parts of input.xmap,
heres the whole caboodle :-

------
<?xml version="1.0"?>

<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
  <map:components>
    <map:generators default="file"/>
    <map:serializers default="html"/>
    <map:transformers default="xslt"/>
    <map:readers default="resource"/>
    <map:matchers default="wildcard"/>
    <map:actions>
	<map:action logger="sitemap.action.sourcetype" name="sourcetype"
src="org.apache.forrest.sourcetype.SourceTypeAction">
	<sourcetype name="glossary-v10">
	<document-declaration public-id="-//Apache Forrest//DTD Glossary
V1.0//EN" />
        </sourcetype>
      </map:action>
    </map:actions>

    <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}"/>
	      <map:serialize type="xml-document"/>
            </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>
</map:sitemap>
------

There are still some differences to Listlocations input.xmap so will look at
those, otherwise it looks ok to me.

> 
> Be careful looking at the logs until you understand
> more about how the sitemap works.

I wasn't really looking at them, just forwarding as per Ross' request.

> ...
> 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.

Ok, will take a look.

Gav...

> 
> > 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
> 
> 
> --
> No virus found in this incoming message.
> Checked by AVG Free Edition.
> Version: 7.1.385 / Virus Database: 268.3.4/299 - Release Date: 31/03/2006



Mime
View raw message