I'd like to define my class mappings in seperate files and them reference
them all from a master like this:

<mapping>
        <description>Composite of all the mapping files</description>
        <include href="conf/lineOfServiceNamesMapping.xml"/>
        <include href="conf/personDetailMapping.xml"/>
        <include href="conf/personSearchCriteriaMapping.xml"/>
        <include href="conf/personSummariesMapping.xml"/>
        <include href="conf/workOfficeNamesMapping.xml"/>
</mapping>


My goal is to reference a single mapping.xml like this via a classpath
resource.  Since the hrefs won't work in that senario, I wrote a util to
generate a composite mapping.xml at build time for the package:

Mapping mapping = new Mapping();
FileInputStream fileInputStream = new FileInputStream( "conf/mapping.xml" );
mapping.loadMapping( new InputSource( fileInputStream ) );
MappingRoot mappingRoot = mapping.getRoot();
mappingRoot.marshal( new FileWriter( "build/classes/mapping.xml" ) );


However, the new mapping.xml is heavily laden with namespaces, and the
marshalled XML is as well.  Is there a way to prevent this?


Cheers
Steve Maring

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

Reply via email to