开发者

xbean's inst2xsd : generate int instead of short/byte

Does anyone knows how can I configure inst2xsd to generate int and not byte (nor short)?

I use the -simple-content-types smar开发者_开发知识库t (default) option.

see also their online docs.

10x, asaf :-)


Posting my solution, due to the high demand:

generateXSD.bat:

inst2xsd -outDir xsd -outPrefix mySchema my.xml

compile.bat:

scomp -compiler "path_to\javac" -src mySrcDir -out lib\mySchema.jar xsd\mySchema.xsd xsdconfig\my.xsdconfig

Ant target:

<target name="xbean">
    <exec executable="cmd" dir="xbean">
        <arg value="/c"/>
        <arg value="generateXSD.bat"/>
        <arg value="-p"/>
    </exec>
    <replace file="xbean/xsd/mySchema.xsd" summary="yes">
        <replacefilter token="xs:byte" value="xs:int"/>
        <replacefilter token="xs:short" value="xs:int"/>
    </replace>
    <exec executable="cmd" dir="xbean">
        <arg value="/c"/>
        <arg value="compile.bat"/>
        <arg value="-p"/>
    </exec>
</target>

Now back to me. I'm on a horse.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜