You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@forrest.apache.org by Ferdinand Soethe <fe...@apache.org> on 2007/03/26 22:36:30 UTC

question about changes in forrest.xmap

I just noticed that there are quite a few changes in forrest.xmap that
require changes to
"How to customize processing of html source"

Is it correct to say that (forrest.xmap line 216)
> <map:match type="wildcard" pattern="**.xml">
>        <map:select type="exists">
>          <map:when test="{lm:plugin.xmap.input}">
>              <map:mount uri-prefix=""
>                         src="{lm:plugin.xmap.input}"
>                         check-reload="yes"
>                         pass-through="true"/>
>          </map:when>
>        </map:select>

will kick in when content is provided through a plugin and the next matcher

> <map:match type="i18n" pattern="{properties:content.xdocs}{1}.*.xml">
>           <map:generate src="{source}" />
>           <map:call resource="transform-to-document">
>             <map:parameter name="src" value="{source}" />
>           </map:call>
>           <map:serialize type="xml-document"/>
>        </map:match>
>        <map:match type="i18n"
> pattern="{properties:content.xdocs}{1}.*.ihtml">
>          <map:generate src="{source}" type="html" />
>          <map:transform src="{lm:transform.html.document}" />
>          <map:transform type="idgen" />
>          <map:serialize type="xml-document"/>
>        </map:match>
>        <map:match type="i18n"
> pattern="{properties:content.xdocs}{1}.*.html">
>          <map:generate src="{source}" type="html" />
>          <map:transform src="{lm:transform.html.document}" />
>          <map:serialize type="xml-document"/>
>        </map:match>
>        <map:match type="i18n"
> pattern="{properties:content.xdocs}{1}.*.txt">
>          <map:generate type="text2xml" src="{source}" />
>          <map:transform src="{lm:transform.text.document}">
>          <map:parameter name="filename" value="{2}" />
>          </map:transform>
>          <map:serialize type="xml-document"/>
>        </map:match>
>        <map:match type="i18n"
> pattern="{properties:content.xdocs}{1}.*.xml">
>           <map:generate src="{source}" />
>           <map:call resource="transform-to-document">
>             <map:parameter name="src" value="{source}" />
>           </map:call>
>           <map:serialize type="xml-document"/>
>        </map:match>
is the new file resolver that combines i18N capabilities with a cascade
through the different supported formats?
Side issue. What is the effect of i18n being used here in the matcher?

Thanks,
Ferdinand

Re: question about changes in forrest.xmap

Posted by Ross Gardler <rg...@apache.org>.
Ferdinand Soethe wrote:
> I just noticed that there are quite a few changes in forrest.xmap that
> require changes to
> "How to customize processing of html source"
> 
> Is it correct to say that (forrest.xmap line 216)
>> <map:match type="wildcard" pattern="**.xml">
>>        <map:select type="exists">
>>          <map:when test="{lm:plugin.xmap.input}">
>>              <map:mount uri-prefix=""
>>                         src="{lm:plugin.xmap.input}"
>>                         check-reload="yes"
>>                         pass-through="true"/>
>>          </map:when>
>>        </map:select>
> 
> will kick in when content is provided through a plugin and the next matcher

Yes. The input plugin sitemaps are processed first, if nothing matches 
in those then it falls through to the pipelines after the one quoted above.

>> <map:match type="i18n" pattern="{properties:content.xdocs}{1}.*.xml">

...

> is the new file resolver that combines i18N capabilities with a cascade
> through the different supported formats?

Yes.

> Side issue. What is the effect of i18n being used here in the matcher?

All is explained in [1]

Ross

[1] 
http://cocoon.apache.org/2.1/apidocs/org/apache/cocoon/matching/LocaleMatcher.html