The following are links into this procedure if anyone want to read more
about it in details.

http://edocs.bea.com/workshop/docs81/doc/en/core/index.html 
http://wiki.apache.org/xmlbeans/XmlBeansFaq#configPackageName 

Example of how to used this with ant:

In your xxx.xsd_template, put the token that you need to be replace
with
at build time.

<?xml version="1.0"?>
<xs:schema targetNamespace="@toBeReplaceAtBuildTimePS81@"
           xmlns:rrcPS81="@toBeReplaceAtBuildTimePS81@"
           xmlns:xs="http://www.w3.org/2001/XMLSchema";
           attributeFormDefault="unqualified"
           elementFormDefault="qualified">
.
.
.
.

In your xxx.xsdconfig_template, put the token that you need to be
replace with
at build time.

  .
  .
  .
    <xb:namespace uri="@replaceAtBuildTimePS80@">
        <xb:package>us.tx.state.rrc.pipeline</xb:package>
    </xb:namespace>
    <xb:namespace uri="@replaceAtBuildTimePS81@">
        <xb:package>us.tx.state.rrc.pipeline</xb:package>
    </xb:namespace>
 .
 .
 .


Here is the ant stuff, used "replaceTokens"

    <target name="genXSD">
        <property file="../build.properties"/>
        <fail unless="edi.targetNamespace.PS80"
              message="Property edi.targetNamespace.PS80 not found in
file build.properties"/>
        <fail unless="edi.targetNamespace.PS81"
              message="Property edi.targetNamespace.PS81 not found in
file build.properties"/>
        <echo>Take care of the target namespace based upon properties
file</echo>
        <delete file="${src.xsd.dir}/ps81.xsd" failonerror="false"/>
        <copy file="${src.xsd.dir}/ps81.xsd_template"
              tofile="${src.xsd.dir}/ps81.xsd">
            <filterchain>
                <replacetokens>
                    <token key="toBeReplaceAtBuildTimePS81"
value="${edi.targetNamespace.PS81}"/>
                </replacetokens>
            </filterchain>
        </copy>
        <delete file="${src.xsd.dir}/ps80.xsd" failonerror="false"/>
        <copy file="${src.xsd.dir}/ps80.xsd_template"
              tofile="${src.xsd.dir}/ps80.xsd">
            <filterchain>
                <replacetokens>
                    <token key="toBeReplaceAtBuildTimePS80"
value="${edi.targetNamespace.PS80}"/>
                </replacetokens>
            </filterchain>
        </copy>
        <delete file="${src.xsd.dir}/psCfg.xsdconfig"
failonerror="false"/>
        <copy file="${src.xsd.dir}/psCfg.xsdconfig_template"
              tofile="${src.xsd.dir}/psCfg.xsdconfig">
            <filterchain>
                <replacetokens>
                    <token key="replaceAtBuildTimePS80"
value="${edi.targetNamespace.PS80}"/>
                    <token key="replaceAtBuildTimePS81"
value="${edi.targetNamespace.PS81}"/>
                </replacetokens>
            </filterchain>
        </copy>
        <echo>Building the xml schema...</echo>
        <echo>${src.xsd.dir}</echo>
        <xmlbean schema="${src.xsd.dir}"
                 destfile="${dest.app-inf.lib}/pipelineXMLBeans.jar"
                 srcgendir="${src.genSrc.dir}"
                 classpathref="xmlbean.classpath"
                 debug="on"/>

    </target>




>>> [EMAIL PROTECTED] 7/10/2006 9:19:06 AM >>>

Hello,

How can I use a xmlBean xsdconfig file with ant?

BTW where could I find good documentation about the xsdconfig syntax?

Thx in advance. 
-- 
View this message in context:
http://www.nabble.com/XMLBean-xsdconfig%2C-ant%2C-eclipse-tf1918716.html#a5252555

Sent from the Xml Beans - User forum at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED] 
For additional commands, e-mail: [EMAIL PROTECTED] 


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to