Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 333910 - If namespace-specified package is used in schema gen, schema name is not used.
Summary: If namespace-specified package is used in schema gen, schema name is not used.
Status: CLOSED WONTFIX
Alias: None
Product: Dali JPA Tools
Classification: WebTools
Component: JAXB (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows Vista
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Tran Le CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-10 15:33 EST by Paul Fullbright CLA
Modified: 2011-01-24 14:59 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Fullbright CLA 2011-01-10 15:33:45 EST
When a schema is generated for a package with a specified namespace

   @XmlSchema(namespace="http://test.org")
   package test;

the namespace is used rather than the specified schema name for the generated schema.

For instance, I want the schema "test.xsd" to be generated, but the schema "test.org.xsd" is generated.
Comment 1 Tran Le CLA 2011-01-12 16:58:31 EST
This is working as specified in the bug 327151, where the given filename is the default name, and is only used when there is no namespace specified. Otherwise the namespace specified for the package will be used as filename.
Comment 2 Paul Fullbright CLA 2011-01-12 17:12:07 EST
I don't understand why I'm required to enter a schema name if it's not going to be used.

But beyond that, it doesn't allow me to modify the name of the schema, which might be necessary if I have an existing schema that I want to generate a second version of, not overwrite.
Comment 3 Neil Hauge CLA 2011-01-12 18:10:45 EST
(In reply to comment #2)
> I don't understand why I'm required to enter a schema name if it's not going to
> be used.
> 
> But beyond that, it doesn't allow me to modify the name of the schema, which
> might be necessary if I have an existing schema that I want to generate a
> second version of, not overwrite.

I think the final implementation referenced in comment 1 was a compromise regarding user choice and handling multiple namespaces.  I can't remember how we ended up there, but I think we decided that using the namespaces as schema names made more sense than using a user specified name with an index appended to the end (in the case of multiple namespaces).  Perhaps this needs more discussion.
Comment 4 Tran Le CLA 2011-01-24 14:59:37 EST
Work as designed.