Hi All,
I am a first timer on JIBX.
I am trying to run CodeGen on a XML schema and I am hitting a problem that
I am not sure how to resolve. Below is the exception from CodeGen.
Exception in thread "main" org.jibx.runtime.JiBXException: Expected "{
http://www.w3.org/2001/XMLSchema}import" end tag, found "{
http://www.w3.org/2001/XMLSchema}annotation" start tag (line 44, col 25, in
xccdf-1.1.4.xsd)
at
org.jibx.runtime.impl.UnmarshallingContext.parsePastCurrentEndTag(UnmarshallingContext.java:731)
at
org.jibx.schema.elements.JiBX_schema_xsprefix_bindingImportElement_access.unmarshal()
at
org.jibx.schema.elements.FilteredSegmentList.JiBX_schema_noprefix_binding_unmarshal_3_0(FilteredSegmentList.java)
at
org.jibx.schema.elements.SchemaElement.JiBX_schema_noprefix_binding_unmarshal_3_0(SchemaElement.java)
at
org.jibx.schema.elements.JiBX_schema_xsprefix_bindingSchemaElement_access.unmarshal()
at org.jibx.schema.elements.SchemaElement.unmarshal(SchemaElement.java)
at
org.jibx.schema.validation.ValidationUtils.load(ValidationUtils.java:130)
at org.jibx.schema.codegen.CodeGen.generate(CodeGen.java:1710)
at org.jibx.schema.codegen.CodeGen.main(CodeGen.java:2206)
An here's the section where CodeGen is having an hiccup. <xsd:annotation>
is line 44.
<xsd:import namespace="http://www.w3.org/XML/1998/namespace"
schemaLocation="xml.xsd">
<xsd:annotation>
<xsd:documentation xml:lang="en">
Import the XML namespace because this schema uses
the xml:lang and xml:base attributes.
</xsd:documentation>
</xsd:annotation>
Here's the command line argument I use to run CodeGen.
java -cp ${JIBX_HOME}/lib/jibx-tools.jar org.jibx.schema.codegen.CodeGen -t
./bindings -v -w xccdf-1.1.4.xsd
I am not sure where to begin to debug this issue, all the supporting XML
schema is also in the same directory. I didn't define the schema, I
obtained the schema from a government website. I am trying to write a JAVA
application that would parse XML files that comply to the XCCDF schema.
Instead of attaching the schema with this email, I am going to attach the
link to download it in case anyone would like to give it a quick try.
http://nvd.nist.gov/scap/xccdf/docs/xccdf-1.1.4-schema-bundle-20071011.zip
Thanks in advance!
David
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_nov
_______________________________________________
jibx-users mailing list
jibx-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jibx-users