Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » problem with prefix
problem with prefix [message #431002] Tue, 23 June 2009 22:38 Go to next message
Eclipse UserFriend
Originally posted by: rodrigo.garcia.kotasoft.com

Hi,

I have a problem with the ns prefix. Sometimes the xml is created
writing the prefix before each element, but sometimes without it.

I have checked the .ecore and the .genmodel and I can't see anything wrong.

Any idea?

Best regards and thank you
Re: problem with prefix [message #431003 is a reply to message #431002] Tue, 23 June 2009 23:26 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 30688
Registered: July 2009
Senior Member
Rodrigo,

Comments below.

Rodrigo García wrote:
> Hi,
>
> I have a problem with the ns prefix. Sometimes the xml is created
> writing the prefix before each element, but sometimes without it.
What's the difference between the sometimes when it does and the
sometimes when it doesn't?
>
> I have checked the .ecore and the .genmodel and I can't see anything
> wrong.
What specifically were you looking for?
>
> Any idea?
I imagine that it depends on the values in the DocumentRoot's
XMLPrefixMap value, but given that the difference between "sometimes"
and "sometimes not" is mysterious, it's really hard to say much of
anything informative...
>
> Best regards and thank you
Re: problem with prefix [message #431026 is a reply to message #431003] Wed, 24 June 2009 14:59 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: rodrigo.garcia.kotasoft.com

Well, I have observed that it seems it doesn't change more, but I have
the xml without the prefix and I'd like to have the prefix.

I have this element:

<precondition description="anything"/>

But I'd like :

<com.kotasoft.core.model.usecase:precondition description="anything"/>

I have the basePackage and the nsPrefix defined.

Any idea?

Ed Merks escribió:
> Rodrigo,
>
> Comments below.
>
> Rodrigo García wrote:
>> Hi,
>>
>> I have a problem with the ns prefix. Sometimes the xml is created
>> writing the prefix before each element, but sometimes without it.
> What's the difference between the sometimes when it does and the
> sometimes when it doesn't?
>>
>> I have checked the .ecore and the .genmodel and I can't see anything
>> wrong.
> What specifically were you looking for?
>>
>> Any idea?
> I imagine that it depends on the values in the DocumentRoot's
> XMLPrefixMap value, but given that the difference between "sometimes"
> and "sometimes not" is mysterious, it's really hard to say much of
> anything informative...
>>
>> Best regards and thank you
Re: problem with prefix [message #431027 is a reply to message #431026] Wed, 24 June 2009 15:07 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 30688
Registered: July 2009
Senior Member
Rodrigo,

Comments below.

Rodrigo García wrote:
> Well, I have observed that it seems it doesn't change more, but I have
> the xml without the prefix and I'd like to have the prefix.
Hmmm.
>
> I have this element:
>
> <precondition description="anything"/>
Is this a root element in the serialization or a nested one?
>
> But I'd like :
>
> <com.kotasoft.core.model.usecase:precondition description="anything"/>
Is the element supposed to be qualified according to the schema or is it
just an unqualified local element?
>
> I have the basePackage and the nsPrefix defined.
>
> Any idea?
You provide to little information for me to help properly.
>
> Ed Merks escribió:
>> Rodrigo,
>>
>> Comments below.
>>
>> Rodrigo García wrote:
>>> Hi,
>>>
>>> I have a problem with the ns prefix. Sometimes the xml is created
>>> writing the prefix before each element, but sometimes without it.
>> What's the difference between the sometimes when it does and the
>> sometimes when it doesn't?
>>>
>>> I have checked the .ecore and the .genmodel and I can't see anything
>>> wrong.
>> What specifically were you looking for?
>>>
>>> Any idea?
>> I imagine that it depends on the values in the DocumentRoot's
>> XMLPrefixMap value, but given that the difference between "sometimes"
>> and "sometimes not" is mysterious, it's really hard to say much of
>> anything informative...
>>>
>>> Best regards and thank you
Re: problem with prefix [message #431056 is a reply to message #431027] Thu, 25 June 2009 10:50 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: rodrigo.garcia.kotasoft.com

This is a multi-part message in MIME format.
--------------030301040801090404000501
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit

Is a nested one.

The element should be qualified.

I attatch you the .ecore and the .genmodel and an example of xml
generated with my model.

Do you need some more info?

Thank you

Ed Merks escribi
Re: problem with prefix [message #431058 is a reply to message #431056] Thu, 25 June 2009 10:56 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 30688
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------030708060201080001080104
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit

Rodrigo,

This part of the serialization makes it clear that you're serializing
with an XMIResourceImpl

<?xml version="1.0" encoding="UTF-8"?>

<com.kotasoft.core.model.usecase:Usecase xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:com.kotasoft.core.model.usecase="http://kotasoft.com/usecase" name="UC-001" id="_eFym8WFmEd6ozbsTiu8hnQ" description="UC-001">


You need to ensure that the generated resource factory with the right
options is used to create the resource you use for loading and saving
your instances.


Rodrigo Garc
Re: problem with prefix [message #431124 is a reply to message #431058] Mon, 29 June 2009 16:54 Go to previous message
Eclipse UserFriend
Originally posted by: rodrigo.garcia.kotasoft.com

Ok, thank you Ed.

Best regards

Ed Merks escribió:
> Rodrigo,
>
> This part of the serialization makes it clear that you're serializing
> with an XMIResourceImpl
>
> <?xml version="1.0" encoding="UTF-8"?>
>
> <com.kotasoft.core.model.usecase:Usecase xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:com.kotasoft.core.model.usecase="http://kotasoft.com/usecase" name="UC-001" id="_eFym8WFmEd6ozbsTiu8hnQ" description="UC-001">
>
>
> You need to ensure that the generated resource factory with the right
> options is used to create the resource you use for loading and saving
> your instances.
>
>
> Rodrigo García wrote:
>> Is a nested one.
>>
>> The element should be qualified.
>>
>> I attatch you the .ecore and the .genmodel and an example of xml
>> generated with my model.
>>
>> Do you need some more info?
>>
>> Thank you
>>
>> Ed Merks escribió:
>>> Rodrigo,
>>>
>>> Comments below.
>>>
>>> Rodrigo García wrote:
>>>> Well, I have observed that it seems it doesn't change more, but I
>>>> have the xml without the prefix and I'd like to have the prefix.
>>> Hmmm.
>>>>
>>>> I have this element:
>>>>
>>>> <precondition description="anything"/>
>>> Is this a root element in the serialization or a nested one?
>>>>
>>>> But I'd like :
>>>>
>>>> <com.kotasoft.core.model.usecase:precondition description="anything"/>
>>> Is the element supposed to be qualified according to the schema or is
>>> it just an unqualified local element?
>>>>
>>>> I have the basePackage and the nsPrefix defined.
>>>>
>>>> Any idea?
>>> You provide to little information for me to help properly.
>>>>
>>>> Ed Merks escribió:
>>>>> Rodrigo,
>>>>>
>>>>> Comments below.
>>>>>
>>>>> Rodrigo García wrote:
>>>>>> Hi,
>>>>>>
>>>>>> I have a problem with the ns prefix. Sometimes the xml is created
>>>>>> writing the prefix before each element, but sometimes without it.
>>>>> What's the difference between the sometimes when it does and the
>>>>> sometimes when it doesn't?
>>>>>>
>>>>>> I have checked the .ecore and the .genmodel and I can't see
>>>>>> anything wrong.
>>>>> What specifically were you looking for?
>>>>>>
>>>>>> Any idea?
>>>>> I imagine that it depends on the values in the DocumentRoot's
>>>>> XMLPrefixMap value, but given that the difference between
>>>>> "sometimes" and "sometimes not" is mysterious, it's really hard to
>>>>> say much of anything informative...
>>>>>>
>>>>>> Best regards and thank you
>>
Previous Topic:Enum modelisation in ecore
Next Topic:[databinding] convert empty string to null
Goto Forum:
  


Current Time: Mon Dec 09 15:21:22 GMT 2019

Powered by FUDForum. Page generated in 0.02813 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top