'#' at the end of a namespace : different of behavior, sometimes a underscore is added, sometimes not. · Issue #939 · javaee/jaxb-v2 (original) (raw)

I've run xjc with the following xsd: (https://gist.github.com/4500553 )

<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:element name="Root" type="myns:Root"/>

sometimes a '_' is added at the end of the package, sometimes not.

/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

I'm away from my workstation at home, I cannot check if this only comes from the different versions of the JDK.

Environment

not available at the time I'm writing this.