Closed basinilya closed 6 years ago
Renaming should be possible. Cases without namespace attribute exists and for now only option is to use default schema1.xsd name.
An XML namespace prefix is an alias for an XML namespace URI. Hence, well-formed XML documents define which namespace they belong to, on the form
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:foo="http://foo.com/someproject/bar" version="1.0">
<foo:element>...</foo:element>
</xs:schema>
The plugin must therefore substitute the "foo" part within the generated XSD. Doing this with an empty namespace is not supported, and the schemagen tool emits such prefixes on the form "ns0", "ns1", "ns2" etc.
The same holds true for the naming of the generated schema files. The underlying SchemaGen tool is emitting files named "schema0.xsd", "schema1.xsd" etc.
How to get a predictable xsd file name (not schema1, schema2, etc.) when generating schema from a java package and with no namespace attribute? The
<uri>
tag is mandatory and cannot be empty.2.2:
1.6: