blob: a293b6181526c52bd6b9e88d06171ac45d843cb1 [file]
<project name="getReqIFSchema" default="patchOriginalXsdAndCmof" basedir=".." xmlns:qvto="http://www.eclipse.org/qvt/1.0.0/Operational">
<description>
Get the ReqIF XML schema and the XHTML Schema fragments
</description>
<property file="./ant/modelcleaner.properties"></property>
<target name="preparePatchOriginalXsdAndCmof">
<mkdir dir="${GEN_PATCHED1_FOLDER}"/>
<mkdir dir="${GEN_PATCHED1_FOLDER}/schema"/>
<mkdir dir="${GEN_PATCHED1_FOLDER}/cmof"/>
<copy todir="${GEN_PATCHED1_FOLDER}/schema">
<fileset dir="${GEN_ORIGINAL_FOLDER}/schema"/>
</copy>
<copy todir="${GEN_PATCHED1_FOLDER}/cmof">
<fileset dir="${GEN_ORIGINAL_FOLDER}/cmof"/>
</copy>
</target>
<target name="patchXsds" depends="preparePatchOriginalXsdAndCmof">
<replace file="${GEN_PATCHED1_FOLDER}/schema/driver.xsd" token="schemaLocation=&quot;http://www.w3.org/TR/xhtml-modularization/SCHEMA/" value="schemaLocation=&quot;"/>
<replace file="${GEN_PATCHED1_FOLDER}/schema/driver.xsd" token="schemaLocation=&quot;http://www.w3.org/2001/xml.xsd" value="schemaLocation=&quot;xml.xsd"/>
<replace file="${GEN_PATCHED1_FOLDER}/schema/reqif.xsd" token="schemaLocation=&quot;http://www.w3.org/2001/xml.xsd" value="schemaLocation=&quot;xml.xsd"/>
<replace file="${GEN_PATCHED1_FOLDER}/schema/reqif.xsd" token="schemaLocation=&quot;http://www.omg.org/spec/ReqIF/20110402/" value="schemaLocation=&quot;"/>
<replace file="${GEN_PATCHED1_FOLDER}/schema/xhtml-attribs-1.xsd" token="schemaLocation=&quot;http://www.w3.org/2001/xml.xsd" value="schemaLocation=&quot;xml.xsd"/>
<replace file="${GEN_PATCHED1_FOLDER}/schema/xhtml-datatypes-1.xsd" token="schemaLocation=&quot;http://www.w3.org/2001/xml.xsd" value="schemaLocation=&quot;xml.xsd"/>
<replace file="${GEN_PATCHED1_FOLDER}/schema/xhtml-framework-1.xsd" token="schemaLocation=&quot;http://www.w3.org/2001/xml.xsd" value="schemaLocation=&quot;xml.xsd"/>
<replace file="${GEN_PATCHED1_FOLDER}/schema/xhtml-text-1.xsd" token="schemaLocation=&quot;http://www.w3.org/2001/xml.xsd" value="schemaLocation=&quot;xml.xsd"/>
<replace file="${GEN_PATCHED1_FOLDER}/schema/xhtml-hypertext-1.xsd" token="schemaLocation=&quot;http://www.w3.org/2001/xml.xsd" value="schemaLocation=&quot;xml.xsd"/>
<replace file="${GEN_PATCHED1_FOLDER}/schema/xhtml-list-1.xsd" token="schemaLocation=&quot;http://www.w3.org/2001/xml.xsd" value="schemaLocation=&quot;xml.xsd"/>
<replace file="${GEN_PATCHED1_FOLDER}/schema/xhtml-edit-1.xsd" token="schemaLocation=&quot;http://www.w3.org/2001/xml.xsd" value="schemaLocation=&quot;xml.xsd"/>
<replace file="${GEN_PATCHED1_FOLDER}/schema/xhtml-pres-1.xsd" token="schemaLocation=&quot;http://www.w3.org/2001/xml.xsd" value="schemaLocation=&quot;xml.xsd"/>
<replace file="${GEN_PATCHED1_FOLDER}/schema/xhtml-inlstyle-1.xsd" token="schemaLocation=&quot;http://www.w3.org/2001/xml.xsd" value="schemaLocation=&quot;xml.xsd"/>
<replace file="${GEN_PATCHED1_FOLDER}/schema/xhtml-object-1.xsd" token="schemaLocation=&quot;http://www.w3.org/2001/xml.xsd" value="schemaLocation=&quot;xml.xsd"/>
<replace file="${GEN_PATCHED1_FOLDER}/schema/xhtml-table-1.xsd" token="schemaLocation=&quot;http://www.w3.org/2001/xml.xsd" value="schemaLocation=&quot;xml.xsd"/>
<replace file="${GEN_PATCHED1_FOLDER}/schema/xhtml-attribs-1.xsd" token="schemaLocation=&quot;http://www.w3.org/2001/xml.xsd" value="schemaLocation=&quot;xml.xsd"/>
<replace file="${GEN_PATCHED1_FOLDER}/schema/xhtml-blkstruct-1.xsd" token="schemaLocation=&quot;http://www.w3.org/2001/xml.xsd" value="schemaLocation=&quot;xml.xsd"/>
<replace file="${GEN_PATCHED1_FOLDER}/schema/xhtml-inlstruct-1.xsd" token="schemaLocation=&quot;http://www.w3.org/2001/xml.xsd" value="schemaLocation=&quot;xml.xsd"/>
<replace file="${GEN_PATCHED1_FOLDER}/schema/xhtml-inlphras-1.xsd" token="schemaLocation=&quot;http://www.w3.org/2001/xml.xsd" value="schemaLocation=&quot;xml.xsd"/>
<replace file="${GEN_PATCHED1_FOLDER}/schema/xhtml-inlpres-1.xsd" token="schemaLocation=&quot;http://www.w3.org/2001/xml.xsd" value="schemaLocation=&quot;xml.xsd"/>
<replace file="${GEN_PATCHED1_FOLDER}/schema/xhtml-blkphras-1.xsd" token="schemaLocation=&quot;http://www.w3.org/2001/xml.xsd" value="schemaLocation=&quot;xml.xsd"/>
<replace file="${GEN_PATCHED1_FOLDER}/schema/xhtml-blkpres-1.xsd" token="schemaLocation=&quot;http://www.w3.org/2001/xml.xsd" value="schemaLocation=&quot;xml.xsd"/>
<replace file="${GEN_PATCHED1_FOLDER}/schema/xhtml-param-1.xsd" token="schemaLocation=&quot;http://www.w3.org/2001/xml.xsd" value="schemaLocation=&quot;xml.xsd"/>
</target>
<target name="patchCmof" depends="preparePatchOriginalXsdAndCmof">
<replace file="${GEN_PATCHED1_FOLDER}/cmof/reqif.cmof" token="http://schema.omg.org/spec/MOF/2.0/cmof.xml#" value="http://schema.omg.org/spec/UML/2.0/uml.xml#"/>
</target>
<target name="patchOriginalXsdAndCmof" depends="patchXsds, patchCmof">
<echo>Open '${GEN_PATCHED1_FOLDER}/cmof/reqif.cmof' and convert package ReqIF to ecore. Make sure that 'camel case names' is set to 'Ignore'. This will create a new file '${GEN_PATCHED1_FOLDER}/cmof/ReqIF.ecore'</echo>
<echo>Create genmodel from '${GEN_PATCHED1_FOLDER}/schema/reqif.xsd' (New->other->Eclipse Modeling Framework/EMF Generator Model -> XML Schema; select XML Namespace from platform / other models from input)</echo>
<echo>Continue with ....</echo>
</target>
<target name="preparePatch2">
<mkdir dir="../gen/patched2"/>
<mkdir dir="../gen/patched2/cmof"/>
<mkdir dir="../gen/patched2/schema"/>
<copy file="../gen/patched1/cmof/ReqIF.ecore" tofile="../gen/patched2/cmof/reqif10.ecore"/>
<copy toDir="../gen/patched2/schema">
<fileset dir="../gen/patched1/schema" includes="*.ecore"/>
</copy>
</target>
</project>