Hello devs,
I have a question about the locationmap.
I wonder whether if it is possible to use a sitemap.selector.exists
within my locationmap.xml?
I reckon it is possible and I will just try it out, but I would like
your opinion about the resulting code.
I want to re-factor the output.xmap from the viewHelper.xhtml that I
will add all the <map:select type="exists"> into the locationmap. e.g.
<map:match pattern="resolve.contract.xhtml.*">
<map:select type="exists">
<map:when test="{project:resources}/templates/{1}.ft">
<map:generate src="{project:resources}/templates/{1}.ft"/>
</map:when>
<map:when test="resources/templates/{1}.ft">
<map:generate src="resources/templates/{1}.ft"/>
</map:when>
<map:otherwise>
<map:generate src="resources/templates/noFt.ft"/>
</map:otherwise>
</map:select>
<map:serialize type="xml"/>
</map:match>
should go in the locationmap.xml and then I can get rid of this match in
the output.xmap and later on match directly:
<map:match pattern="get.contract.*.xhtml">
<map:generate src="{lm:templates/{1}.ft}"/>
<map:transform src="resources/stylesheets/contract.xsl">
<!--Which output format?-->
<map:parameter name="format" value="xhtml"/>
</map:transform>
<map:transform type="i18n">
<map:parameter name="locale" value="{request:locale}"/>
</map:transform>
<map:serialize type="xml"/>
</map:match>
Trying to ask, whether it should/is best practice to resolve in the
locationmap the resources with the help of sitemap.selector.exists?
salu2
--
thorsten
"Together we stand, divided we fall!"
Hey you (Pink Floyd)