Skip to content

Instantly share code, notes, and snippets.

@lindenb
Last active December 10, 2015 22:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lindenb/4500553 to your computer and use it in GitHub Desktop.
Save lindenb/4500553 to your computer and use it in GitHub Desktop.
is there a bug in XJC ? (underscore at the end of the package )
/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/bin/xjc test.xsd
parsing a schema...
compiling a schema...
host/ns_/ObjectFactory.java
host/ns_/Root.java
host/ns_/package-info.java
$ /usr/local/package/jdk1.7.0_07/bin/xjc test.xsd
parsing a schema...
compiling a schema...
host/ns/ObjectFactory.java
host/ns/Root.java
host/ns/package-info.java
<?xml version="1.0" encoding="UTF-8"?>
<!--
please run:
$ xjc test.xsd
do you get:
parsing a schema...
compiling a schema...
host/ns/ObjectFactory.java
host/ns/Root.java
host/ns/package-info.java
or do you get (package with underscore)
parsing a schema...
compiling a schema...
host/ns_/ObjectFactory.java
host/ns_/Root.java
host/ns_/package-info.java
-->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:myns="http://host/ns#"
targetNamespace="http://host/ns#"
elementFormDefault="qualified"
attributeFormDefault="qualified"
>
<xs:complexType name="Root">
<xs:sequence>
<xs:element name="name" type="xs:string"/>
</xs:sequence>
</xs:complexType>
<xs:element name="Root" type="myns:Root"/>
</xs:schema>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment