You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Robby Pelssers <ro...@ciber.com> on 2010/04/13 15:51:45 UTC

Question about sitemap context (ProcessInfoProvider ??)

Hi all,

I was wondering if it was possible to put beans persistent in the context which is available to the sitemap.  I'm not sure if the ProcessInfoProvider is the bean responsible for maintaining the context.

My use case is as follows:

I have one bean 'datasheetApplication' which knows all about the folderstructure of the filesystem containing the data (xml files).

What I basically want is to do something like:

Sitemap.xmap:

      <!-- 
       {1}: state
       -->
      <map:match pattern="generatePackageDatasheet-step-final/*">
        <map:generate src="cocoon:/generatePackageDatasheet-step-1/{1}"/>
        <map:transform src="xslt/batch/topics/copyImages.xslt" type="saxon">
          <map:parameter name="path" value="{datasheetApplication.getPackageTopicsDirPath()}"/>
        </map:transform>
        <map:serialize type="xml"/>
      </map:match>


     

ApplicationContext.xml:

  <bean id="datasheetApplication" class="com.nxp.spider2.application.DatasheetApplicationImpl">
    <property name="spider" ref="spiderBean"/>
    <property name="templatesURI" value="${datasheet.templates_uri}"/>
    <property name="legalInformationAutomotiveFileName" value="${datasheet.legal_information_automotive}"/>
    <property name="legalInformationNonAutomotiveFileName"   value="${datasheet.legal_information_non-automotive}"/>   
    <property name="contactInformationFileName" value="${datasheet.contact_information}"/>
    <property name="revisionHistoryFileName" value="${datasheet.revision_history}"/>
    <property name="topicsDirName" value="${datasheet.topicsDirName}"/>
    <property name="productsDirName" value="${datasheet.productsDirName}"/> 
    <property name="packagesDirName" value="${datasheet.packagesDirName}"/>               
  </bean>

  <bean id="processInfoProvider" class="org.apache.cocoon.processing.impl.ProcessInfoProviderImpl"/>  


Is it possible to add the datasheetApplication bean to the sitemap context so I can do something like:

<map:parameter name="path" value="{datasheetApplication.getPackageTopicsDirPath()}"/>


Kind regards,
Robby Pelssers