Hello,
I have two basic schema files. The second schema file imports the first,
and uses the hash character in its target namespace.
foo.xsd:
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema elementFormDefault="qualified" attributeFormDefault="unqualified"
targetNamespace="
http://www.foo.com/ns" xmlns:xs="
http://www.w3.org/2001/XMLSchema" xmlns:foo="
http://www.foo.com/ns">
<xs:element name="Foo">
<xs:complexType>
<xs:sequence>
<xs:element name="foo" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
bar.xsd:
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema elementFormDefault="qualified" attributeFormDefault="unqualified"
targetNamespace="
http://www.foo.com/ns#bar" xmlns:xs="
http://www.w3.org/2001/XMLSchema" xmlns:bar="
http://www.foo.com/ns#bar">
<xs:import namespace="
http://www.foo.com/ns" schemaLocation="foo.xsd"/>
<xs:element name="Bar">
<xs:complexType>
<xs:sequence>
<xs:element name="bar" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
xjc 2.1.12 reports the following:
$ ./jaxb-ri-20090708/bin/xjc.bat -d build/classes -verbose *.xsd
parsing a schema...
compiling a schema...
[INFO] generating code
unknown location
com\foo\ns\Foo.java
com\foo\ns\ObjectFactory.java
com\foo\ns\package-info.java
com\foo\ns_bar\Bar.java
com\foo\ns_bar\ObjectFactory.java
com\foo\ns_bar\package-info.java
xjc 2.2 however reports:
$ ./jaxb-ri-20091104/bin/xjc.bat -d build/classes -verbose *.xsd
parsing a schema...
compiling a schema...
[INFO] generating code
unknown location
com\foo\ns\Bar.java
com\foo\ns\Foo.java
com\foo\ns\ObjectFactory.java
com\foo\ns\package-info.java
Is the difference in xjc behavior due to the hash character in bar's target
namespace?
Thanks!
--
Adam
zellster_at_gmail.com