Details
-
Bug
-
Status: Closed
-
Critical
-
Resolution: Fixed
-
0.7
-
None
Description
IF a source format plugin matches on a general pattern, such as **.xml but does not process the file because it does not appear in the handled DTD types the processing of that file is not passed to other matchers in the pipeline.
For example, the simplified docbook plugin has the following match:
<map:match pattern="**.xml">
<map:generate src="{project:content.xdocs}{1}.xml" />
<map:call resource="transform-to-document">
<map:parameter name="src" value="{project:content.xdocs}{1}.xml" />
</map:call>
<map:serialize type="xml-document"/>
</map:match>
transform-to-document is:
<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="docbook-v4.1.2">
<map:transform src="{forrest:plugins}/simplified-docbook/resources/stylesheets/sdocbook2document.xsl" />
</map:when>
<map:when test="docbook-v4.2">
<map:transform src="{forrest:plugins}/simplified-docbook/resources/stylesheets/sdocbook2document.xsl" />
</map:when>
<map:when test="sdocbook-v1.0">
<map:transform src="{forrest:plugins}/simplified-docbook/resources/stylesheets/sdocbook2document.xsl" />
</map:when>
<map:otherwise/>
</map:select>
If we make a request for a document How-To document (hence not a DocumentV*) the match to transform this document to a documentV* format (found in forrest.xmap) is never reached (and still would not be reached if it were extracted to another plugin).
In otherwords, since the simplified-docbook is matching the request it , but not processing it appropriately (it gets passed through unconverted) the simplified-docbook plugin is preventing subsequent matches.
We need to do one of the following:
- allow a matcher to indicate that it never actually processed the file and therefore the pass-through feature should come into effect
- enable multiple matches for a single request (something Cocoon does not do - and would break Cocoon if implemented)
- allow a plugin to extend the transform-to-document resource in the parent sitemap
- ???
For example, the simplified docbook plugin has the following match:
<map:match pattern="**.xml">
<map:generate src="{project:content.xdocs}{1}.xml" />
<map:call resource="transform-to-document">
<map:parameter name="src" value="{project:content.xdocs}{1}.xml" />
</map:call>
<map:serialize type="xml-document"/>
</map:match>
transform-to-document is:
<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="docbook-v4.1.2">
<map:transform src="{forrest:plugins}/simplified-docbook/resources/stylesheets/sdocbook2document.xsl" />
</map:when>
<map:when test="docbook-v4.2">
<map:transform src="{forrest:plugins}/simplified-docbook/resources/stylesheets/sdocbook2document.xsl" />
</map:when>
<map:when test="sdocbook-v1.0">
<map:transform src="{forrest:plugins}/simplified-docbook/resources/stylesheets/sdocbook2document.xsl" />
</map:when>
<map:otherwise/>
</map:select>
If we make a request for a document How-To document (hence not a DocumentV*) the match to transform this document to a documentV* format (found in forrest.xmap) is never reached (and still would not be reached if it were extracted to another plugin).
In otherwords, since the simplified-docbook is matching the request it , but not processing it appropriately (it gets passed through unconverted) the simplified-docbook plugin is preventing subsequent matches.
We need to do one of the following:
- allow a matcher to indicate that it never actually processed the file and therefore the pass-through feature should come into effect
- enable multiple matches for a single request (something Cocoon does not do - and would break Cocoon if implemented)
- allow a plugin to extend the transform-to-document resource in the parent sitemap
- ???