[qvto]how to transform undefined attributes [message #800142] |
Thu, 16 February 2012 18:53 |
Allen Zhang Messages: 14 Registered: February 2012 |
Junior Member |
|
|
If the meta model does not explicitly define the attribute of a node. e.g.:
M1: <A a1="a1" a2="a2" />
a1 is defined in the meta model, but a2 is not.
If I want to transform M1 to M2 (M1 and M2's meta model is the same),
M2: <A a1="a1" a2="a2" />
for a1:
a1 := self.a1
but how should I treat a2?
[Updated on: Thu, 16 February 2012 18:54] Report message to a moderator
|
|
|
|
|
Re: [qvto]how to transform undefined attributes [message #804203 is a reply to message #803957] |
Wed, 22 February 2012 10:07 |
Ed Willink Messages: 7655 Registered: July 2009 |
Senior Member |
|
|
Hi
What you obseerve is very reasonable. The text in a CDATA statement is
text, not a model reference, so when model definitions change it may
change. Just the same as people who reference Section 3.1.2 in a word
document without using Cross References.
If you use references they must be references.
If you really need the CDATA then you need to write a custom conversion
that provides the non-standard reference recognition in CDATA, and
ideally eliminates CDATA altogether..
Regards
Ed Willink
On 22/02/2012 02:38, Allen Zhang wrote:
> Hi, thank you for the help.
> The real problem is: when I transform from BPEL to BPEL, here is
> something like:
> <bpel:process ...
> xmlns:ns0="namespace1"
> ...>
> ...
> <bpel:variable messageType="ns0:response" name="response"/>
>
> when I do the transformation, I didn't take care of "ns0", but the
> namespace is generated automatically with a new name, which may be
> different from the original one.
>
> <bpel:process ...
> xmlns:ns1="namespace1" //new name is ns1
> ...>
> ...
> <bpel:variable messageType="ns1:response" name="response"/>
>
> Everything is ok by then, but next here is:
> <bpel:query
> queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0"><![CDATA[ns0:p1]></bpel:query>
>
> In the query, it is the original "ns0", not changed to "ns1".
>
> Thank you again.
>
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03679 seconds