Yang,

First of all, this is a pretty rare corner case. Even if the global 
namespace wasn't null (for example, assume it's just "http://global";), 
your example is an SDO Type with two properties named "element1". The SDO 
spec says that if you have more than one property with the same name, the 
first one hides the others, so you wouldn't actually be able to change the 
second one, unless you add an aliasName.

The next thing about the spec is that the CS serialization of old values 
(ChangeSummary.Settings) isn't really valid XML anyway. It's just a 
partial fragment, of XML that represents the changed value(s) and a 
reference (sdo:ref) to the actual changed object. So, for this case, I'm 
not even sure whether or not the element name being serialized shouldn't 
actually be the SDO property name itself. For example, say we used the 
sdo:name annotation to rename the second element1 to "second1" then maybe 
the CS should actually look like this:

<element1 ... >
<second1 ... >

There are really more questions then answers in the spec related to CS 
serialization format :-(

With all that in mind, I would say that if you need to find out if a 
property maps to an XSD ref element, then you can always use EMF's 
ExtendedMetaData. But, I'd suggest not worrying too much about these 
corner cases yet. Just make note of them so that we can get them addressed 
in the spec.

Thanks,
Frank.


"Yang ZHONG" <[EMAIL PROTECTED]> wrote on 09/25/2006 02:13:22 
PM:

> Thank Frank for clarifying "element ref" mapping. I'm working on
> ChangeSummary StAX writer,
> there're many places Properties/elements need to be outputed as XML,
> such as ChangeSummary.Setting.
> 
> Supposing we have such Properties definition:
>     <element xmlns:global="" ref="global:element1"/>
>     <element name="element1" ...
> I plan to output XML like these *respectively*
>     <global:element1 xmlns:global="" ...
>     <element1 ...
> 
> First, am I planning right please?
> 
> Second if I plan right, given a Property "element1", how can I 
distinguish
> local element (<element name="element1") from global element without
> NameSpace (<element xmlns:global="" ref="global:element1"/>) please?
> 
> 
> Thanks.
> 
> -- 
> 
> Yang ZHONG


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to