Author: crossley
Date: Sat Apr 1 21:53:05 2006
New Revision: 390781
URL: http://svn.apache.org/viewcvs?rev=390781&view=rev
Log:
Now using SourceTypeAction (content aware pipelines) to respond to the
document type declaration in the xml instances. So now not restricted
to using specific *-locations.html URIs.
Modified:
forrest/trunk/plugins/org.apache.forrest.plugin.input.listLocations/input.xmap
forrest/trunk/plugins/org.apache.forrest.plugin.input.listLocations/status.xml
Modified:
forrest/trunk/plugins/org.apache.forrest.plugin.input.listLocations/input.xmap
URL:
http://svn.apache.org/viewcvs/forrest/trunk/plugins/org.apache.forrest.plugin.input.listLocations/input.xmap?rev=390781&r1=390780&r2=390781&view=diff
==============================================================================
---
forrest/trunk/plugins/org.apache.forrest.plugin.input.listLocations/input.xmap
(original)
+++
forrest/trunk/plugins/org.apache.forrest.plugin.input.listLocations/input.xmap
Sat Apr 1 21:53:05 2006
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
<!--
- Copyright 1999-2005 The Apache Software Foundation or its licensors,
+ Copyright 1999-2006 The Apache Software Foundation or its licensors,
as applicable.
Licensed under the Apache License, Version 2.0 (the "License");
@@ -16,16 +16,59 @@
limitations under the License.
-->
<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
+ <map:components>
+ <map:actions>
+ <map:action logger="sitemap.action.sourcetype" name="sourcetype"
src="org.apache.forrest.sourcetype.SourceTypeAction">
+ <sourcetype name="locations-v12">
+ <document-declaration public-id="-//Apache Forrest//DTD Locations
V1.2//EN" />
+ </sourcetype>
+ <sourcetype name="locations-v11">
+ <document-declaration public-id="-//Apache Forrest//DTD Locations
V1.1//EN" />
+ </sourcetype>
+ <sourcetype name="locations-v10">
+ <document-declaration public-id="-//Apache Forrest//DTD Locations
V1.0//EN" />
+ </sourcetype>
+ </map:action>
+ </map:actions>
-<map:pipelines>
+ <map:selectors default="parameter">
+ <map:selector logger="sitemap.selector.parameter" name="parameter"
src="org.apache.cocoon.selection.ParameterSelector" />
+ </map:selectors>
+ </map:components>
- <map:pipeline>
- <map:match type="regexp" pattern="^(.*?)([^/]*)locations.xml$">
- <map:generate type="file" src="{lm:project.{1}{2}locations.xml}"/>
- <map:transform src="{lm:listLocations.transform.locations.document}"/>
- <map:serialize type="xml-document"/>
- </map:match>
- </map:pipeline>
-</map:pipelines>
+ <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="locations-v12">
+ <map:generate type="file" src="{lm:project.{../../1}.xml}"/>
+ <map:transform
src="{lm:listLocations.transform.locations.document}"/>
+ <map:serialize type="xml-document"/>
+ </map:when>
+ <map:when test="locations-v11">
+ <map:generate type="file" src="{lm:project.{../../1}.xml}"/>
+ <map:transform
src="{lm:listLocations.transform.locations.document}"/>
+ <map:serialize type="xml-document"/>
+ </map:when>
+ <map:when test="locations-v10">
+ <map:generate type="file" src="{lm:project.{../../1}.xml}"/>
+ <map:transform
src="{lm:listLocations.transform.locations.document}"/>
+ <map:serialize type="xml-document"/>
+ </map:when>
+ </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>
Modified:
forrest/trunk/plugins/org.apache.forrest.plugin.input.listLocations/status.xml
URL:
http://svn.apache.org/viewcvs/forrest/trunk/plugins/org.apache.forrest.plugin.input.listLocations/status.xml?rev=390781&r1=390780&r2=390781&view=diff
==============================================================================
---
forrest/trunk/plugins/org.apache.forrest.plugin.input.listLocations/status.xml
(original)
+++
forrest/trunk/plugins/org.apache.forrest.plugin.input.listLocations/status.xml
Sat Apr 1 21:53:05 2006
@@ -36,24 +36,29 @@
<changes>
<!-- Add new releases here -->
<release version="0.2-dev" date="not-released">
+ <action dev="DC" type="add" context="code" importance="high">
+ Now using SourceTypeAction (content aware pipelines) to respond to the
+ document type declaration in the xml instances. So now not restricted
+ to using specific *-locations.html URIs.
+ </action>
<action dev="RDG" type="add" context="code" importance="high">
- Added geoPoint element to DTD to allow the recording of Latitude and
Longitude
- co-ords for entries.
+ Added geoPoint element to DTD v1.2 to allow the recording of Latitude
and Longitude
+ co-ordinatess for entries.
</action>
- <action dev="DC" type="update" context="core" importance="high"
due-to="Philippe Perez">
+ <action dev="DC" type="update" context="code" importance="high"
due-to="Philippe Perez">
Use locationmap for resource resolution. Exposes internal stylesheets
as {lm:listLocations.transform.*.*}
</action>
- <action dev="DC" type="update" context="core">
+ <action dev="DC" type="update" context="code">
DTD v1.1 enables use of Common Character Entities.
</action>
- <action dev="DC" type="update" context="core">
+ <action dev="DC" type="update" context="code">
DTD v1.1 enables notes to have links.
</action>
- <action dev="DC" type="add" context="core">
+ <action dev="DC" type="add" context="code">
Added external DTD v1.0
</action>
- <action dev="DC" type="add" context="core">
+ <action dev="DC" type="add" context="code">
Initial plugin code.
</action>
</release>
@@ -61,7 +66,7 @@
<todo>
<actions priority="medium">
- <action context="core" dev="open">
+ <action context="code" dev="open">
Add some more elements to the xml structure.
</action>
</actions>