i'm trying generate classes bunch of xsd:s include same common schema simplified looks this:
schema1.xsd:
<xsd:schema xmlns:xsd="http://www.w3.org/2001/xmlschema" targetnamespace="namespace"> <xsd:include schemalocation="common.xsd"/> ..... </xsd:schema>
schema2.xsd:
<xsd:schema xmlns:xsd="http://www.w3.org/2001/xmlschema" targetnamespace="namespace"> <xsd:include schemalocation="common.xsd"/> ..... </xsd:schema>
and common schema not define targetnamespace
now when try generating classes using:
xjc -extension -episode episode.xjb -p se.test -encoding utf-8 -mark-generated schema1.xsd schema2.xsd
i error saying: 2 declarations cause collision in objectfactory class
which point same line number in common schema. there way of getting around problem. if leave out package parameter works fine specify own package.
so problem 1 of xsds (i have 60 of them didn't @ each in detail...) missing namespace.
gonna contact supplier of xsds , ask them fix it.
Comments
Post a Comment