Update of /cvsroot/xdoclet-plugins/xdoclet-plugins/plugin-castor/src/main/java/org/xdoclet/plugin/castor
In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv9889/plugin-castor/src/main/java/org/xdoclet/plugin/castor
Modified Files:
CastorMappingXMLPlugin.java CastorMappingXMLPlugin.jelly
Log Message:
reworked jelly merge, moved taglib from web plugin to generama to provide standard
merge capabilities
Index: CastorMappingXMLPlugin.java
===================================================================
RCS file: /cvsroot/xdoclet-plugins/xdoclet-plugins/plugin-castor/src/main/java/org/xdoclet/plugin/castor/CastorMappingXMLPlugin.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** CastorMappingXMLPlugin.java 14 Mar 2006 10:42:14 -0000 1.5
--- CastorMappingXMLPlugin.java 24 Sep 2006 11:58:56 -0000 1.6
***************
*** 149,162 ****
}
! /**
! * Add properties to Jelly context
! *
! * @param map The context map
! */
! protected void populateContextMap(Map map) {
! super.populateContextMap(map);
! map.put("mappingmergefile", CLASS_MAPPING_MERGE);
! }
!
/**
* Setter for an include file list separated by ','
--- 149,153 ----
}
!
/**
* Setter for an include file list separated by ','
***************
*** 238,249 ****
}
- /**
- * Getter for mergerDir property
- *
- * @return The value of the property
- */
- public File getMergedir() {
- return mergeDir;
- }
private void dumpClzListAndHierarchy(Collection metadata) {
--- 229,232 ----
Index: CastorMappingXMLPlugin.jelly
===================================================================
RCS file: /cvsroot/xdoclet-plugins/xdoclet-plugins/plugin-castor/src/main/java/org/xdoclet/plugin/castor/CastorMappingXMLPlugin.jelly,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** CastorMappingXMLPlugin.jelly 23 Jun 2005 01:17:16 -0000 1.3
--- CastorMappingXMLPlugin.jelly 24 Sep 2006 11:58:56 -0000 1.4
***************
*** 1,4 ****
<?xml version="1.0" encoding="UTF-8"?>
! <j:jelly xmlns:j="jelly:core" xmlns:x="jelly:xml" xmlns:jsl="jelly:jsl">
<x:doctype name="mapping" publicId="${plugin.publicId}" systemId="${plugin.systemId}" trim="true" />
<x:comment>${dontedit}</x:comment>
--- 1,5 ----
<?xml version="1.0" encoding="UTF-8"?>
! <j:jelly xmlns:j="jelly:core" xmlns:x="jelly:xml" xmlns:jsl="jelly:jsl"
! xmlns:g='jelly:org.generama.jelly.GeneramaTaglib'>
<x:doctype name="mapping" publicId="${plugin.publicId}" systemId="${plugin.systemId}" trim="true" />
<x:comment>${dontedit}</x:comment>
***************
*** 11,41 ****
</j:forEach>
<j:import uri="org/xdoclet/plugin/castor/mappingxml/Classes.jelly" inherit="true"/>
! <!-- class-mappings.xml merge contents... START -->
! <j:if test="${plugin.getMergeFile(mappingmergefile).exists()}">
! <x:parse var="extraMappings" xml="${plugin.getMergeFile(mappingmergefile)}"/>
! </j:if>
! <jsl:stylesheet select="$extraMappings">
! <!-- Matches all nodes -->
! <jsl:template match="*" trim="false">
! <jsl:copy>
! <jsl:applyTemplates/>
! </jsl:copy>
! </jsl:template>
! <!-- Bypass top element; "/" select document node, parent of top node -->
! <jsl:template match="/" trim="false">
! <jsl:applyTemplates select="child::*/child::*" />
! </jsl:template>
! <!-- If we want to make constant top node name, we could use
! <jsl:template match="/mapping" trim="false">
! <jsl:applyTemplates select="child::*" />
! </jsl:template>
! <jsl:template match="*" trim="false">
! <jsl:copy>
! <jsl:applyTemplates/>
! </jsl:copy>
! </jsl:template>
! -->
! </jsl:stylesheet>
! <!-- class-mappings.xml merge contents... END -->
</mapping>
</j:jelly>
--- 12,20 ----
</j:forEach>
<j:import uri="org/xdoclet/plugin/castor/mappingxml/Classes.jelly" inherit="true"/>
! <g:merge file="class-mappings.xml">
! to specify aditional class mappings put file "class-mappings.xml" into
! merge directory.
! Define root element as <j:jelly xmlns:j="jelly:core">
! </g:merge>
</mapping>
</j:jelly>
|