This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 160474 - Improve support of imported schema without target namespace
Summary: Improve support of imported schema without target namespace
Status: NEW
Alias: None
Product: xml
Classification: Unclassified
Component: Schema Model (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: Samaresh Panda
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-03-17 16:29 UTC by Nikita Krjukov
Modified: 2009-03-18 19:50 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nikita Krjukov 2009-03-17 16:29:31 UTC
There is a problem with getting the actual namespace of components' located in a schema without target namespace
specified. In such case the method AbstractDocumentComponent.getEffectiveNamspace() returns null. But actually the
namespace always presents according to the specification. It either can be the empty string or it has to be derived from
the importing schema. So the main idea is to be as much close to the XSD specification as possible.
Comment 1 Nikita Krjukov 2009-03-18 19:50:44 UTC
There is a suggestion how the feature should be implemented. 
The main target is to provide simple way of getting namespace of any schema component regardless of the owning schema
has target namespace or not. Actually the important case is absence of target namespace because in opposite case there
isn't a problem. A schema without target namespace can have two state: pure and included (redefined). 
In pure state all schema components are considered as having empty namespace (empty string). 
In imported stat all schema components are considered as having a namespace taken from an including schema. 
The only difference between two states of such schema is target namespace. 

It is suggested to introduce a new mutated kind of schema model, which based on a schema model in pure state. Such
mutated schema should represent a schema in included state. Such model is a kind of wrapper. It delegates almost all
functions to the nested model in pure state and modifies only information about target namespace. 

In such way a pure schema model can be obtained when it is inquired by file name. But an included schema model should be
returned, when a schema component is obtained with reference resolution from another schema model. 

It's a kind of general idea only so far. It's not clear yet how much changes to API and implementation is required.