dizzzz / jing-trang

Automatically exported from code.google.com/p/jing-trang
Other
0 stars 0 forks source link

Enhancement - XML to XSD conversion - Enhancement #77

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Convert the attached XML file to an xsd.

What is the expected output? What do you see instead?

Ideally, I would have expected only two schemas to be produced (namespace1 
and namespace2). However three xsd schemas are produced. 

What version of the product are you using? On what operating system?

Latest source trunk

Please provide any additional information below.

I can see why three schemas are produced, as an element in the default 
namespace; "value" appears with in two contexts with in the source xml 
document. So it is normalised to the default namespace, which requires an 
additional schema to be created with no "targetNamespace".

If the "value" element appeared only once, it would be assigned to the 
first parent element namespace that was not the defaultNamespace, and have 
a form="unqualified".

May I suggest the following enhancements over this behavior would be 
appropriate:-

1. To optionally choose the defaultNamespace
2. To optionally invoke the following behavior; that all elements in the 
default namespace are assigned to the first parent element namespace that 
is not the defaultNamespace.

Original issue reported on code.google.com by blueheyb...@gmail.com on 28 Apr 2009 at 1:35

Attachments: