You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jaxme-dev@ws.apache.org by Co...@courts.mo.gov on 2005/06/22 20:50:03 UTC

error generating java code from schema




Hello,

I'm a new jaxme user and have managed to get the example "Address" schema
from the documentation working. I am
now trying to get a schema given to me by a contractor working in jaxme.
When i run the task to generate java code from
the schema I get the following error:

    BUILD FAILED
    C:\dev\projects\local\xmlgen\build.xml:129: At
file:/C:/dev/projects/local/xmlgen/src/schema/jxdm/3.0.2/jxdm.xsd, line 31,
column
    49: At file:/C:/dev/projects/local/xmlgen/src/schema/jxdm/3.0.2
/jxdm.xsd, line 31, column 49: A global attribute group {http://www
    .it.ojp.gov/jxdm/3.0.2}SuperTypeMetadata is already defined.

The schema layout I am trying to load looks something like this:

case.xsd
      imports:
            extensions.xsd
                  imports:
                        jxdm.xsd
                        xsd.xsd(proxy?)
                              imports:
                                    jxdm.xsd
                  includes:
                        CourtTypeCode.xsd
                        IneffectiveCounselCodeType.xsd
                        InformedOfAllocutionCodeType.xsd
                        ResolutionSatisfiedTypeCodeType.xsd
                        etc...
            constraints.xsd
                  imports:
                        extensions.xsd
                              see above
                        xsd.xsd(proxy?)
                              imports:
                                    jxdm.xsd
                        ansi_d20.xsd(proxy?)
                              imports:
                                    ansi_d20.xsd
                                    jxdm.xsd
                        usps_states.xsd(proxy?)
                              imports:
                                    usps_states.xsd
                                    jxdm.xsd
                        ncic_2000.xsd(proxy?)
                              imports:
                                    ncic_2000.xsd
                                    jxdm.xsd
                        nibrs_misc.xsd(proxy?)
                              imports
                                    nibrs_misc.xsd
                                    jxdm.xsd
                  includes:
                        AccidentDwiBacCodeType.xsd
                        CaseDispositionCodeType.xsd
                        CaseLevelSecurityCodeType.xsd
                        ChargeDispositionCodeType.xsd
                        etc...



I'm not the creator of the schema files, and not really sure of the rules
that schema files have to follow. But
it appears that I am getting this errors because the string
"<xsd:attributeGroup name="SuperTypeMetadata"/>"
appears in more than one file. I have tried commenting out this line in the
jxdm.xsd file but I get another
similar error for a different global being already defined. If I comment
out the line in the other file, conversion.xsd,
I still get the same error about SuperTypeMetadata already being defined.

I spoke with the contractor and he said that the constraints.xsd will be
full of dupes of the Types in the jxdm.xsd
because all of the ones in the jxdm.xsd are unbounded and they need to do
this to add constraints. And he said
that the schema validates in xmlspy whatever that is good for.

Does anyone have any ideas?

Cory Bestgen
Computer Information Technologist II
Information Technology Division
Office of State Courts Administrator
(573) 522 - 5455
cory.bestgen@courts.mo.gov


---------------------------------------------------------------------
To unsubscribe, e-mail: jaxme-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: jaxme-dev-help@ws.apache.org


Re: error generating java code from schema

Posted by Jochen Wiedmann <jo...@gmail.com>.
On 6/22/05, Cory.Bestgen@courts.mo.gov <Co...@courts.mo.gov> wrote:

> But
> it appears that I am getting this errors because the string
> "<xsd:attributeGroup name="SuperTypeMetadata"/>"
> appears in more than one file.

Indeed, this is what the error message indicates. You've got to move
these common parts into a separate file and import or include these.

Note, that any schema validator (Xerces, for example) should expose
this as a problem and bark about it.


Jochen


-- 
What are the first steps on the moon, compared to your child's?

---------------------------------------------------------------------
To unsubscribe, e-mail: jaxme-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: jaxme-dev-help@ws.apache.org