InternalsΒΆ

The following material has been prepared by Justin Deolivera documenting the GTXML framework:

Generated objects matching the XML schema:

Schema and bindings plugins:

XML Development FAQ

Frequently asked questions for binding developers.

  • Q: NullPointerException in createURIWithCache when parsing?

    When I try to parse a document, i get the following error:

    java.lang.NullPointerException
        at org.eclipse.emf.common.util.URI.createURIWithCache(URI.java:560)
        at org.eclipse.emf.common.util.URI.createURI(URI.java:494)
        at org.eclipse.xsd.impl.XSDSchemaDirectiveImpl.resolve(XSDSchemaDirectiveImpl.java:389)
        at org.eclipse.xsd.impl.XSDImportImpl.importSchema(XSDImportImpl.java:476)
        at org.eclipse.xsd.impl.XSDSchemaImpl.resolveSchema(XSDSchemaImpl.java:2120)
        at org.eclipse.xsd.impl.XSDSchemaImpl.resolveNamedComponent(XSDSchemaImpl.java:2143)
       ...
    

    What this means is that somewhere in your instance document, or in a schema it references, a relative URI cannot be resolved to an absolute location.

    Possible solutions:

    • Ensure that the getSchemaLocationResolver method has been implemented for the Configuration class of your schema. The Code Generator can be used to create a schema location resolver specific to your schema.

    • Ensure the Configuration class for your schema declares all the necessary dependencies.

  • Q: empty XML element when trying to encode my objects?

    When I try to encode an object ( for instance a polygon ), I get an empty XML element:

    <ogc:Contains>
       <ogc:PropertyName>SERVICEBBOX</ogc:PropertyName>
       <gml:Polygon /> <!-- Polygon isn't well generated  -->
    </ogc:Contains>
    

    What this means is that the encoding for the element ( Polygon in this case ) has not yet been implemented. Please post the problem to the users list.