How to access the ID of a XSDComponent [message #77530] |
Thu, 02 April 2009 12:04  |
Eclipse User |
|
|
|
The specification http://www.w3.org/TR/xmlschema-1/ describes a field
'id' at nearly each XSD Element, e.g. "xsd:attribute".
I don't find this field in the ECORE model xsd.ecore.
My problem is that I want to read and write this field.
I have this XSD excerpt:
<xsd:attribute name="B" id="r19">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:minLength value="0" />
<xsd:maxLength value="10" />
</xsd:restriction>
</xsd:simpleType>
</xsd:attribute>
I don't know how to read the value of the 'id' through the
XSDAttributeDeclaration but succeed via the field 'element:DOMElement'.
I don't know how to set the value of 'id'. I tried with filling the
XSDResourceImpl:setIntrinsicIDToEObjectMap(), but this has no effect for
XSDResourceImpl:save().
This map is also not filled at load time.
Is this a bug or is there another proposed way to read and write 'id'?
Thanks,
Joachim
|
|
|
|
Re: How to access the ID of a XSDComponent [message #78052 is a reply to message #77546] |
Wed, 22 July 2009 07:56  |
Eclipse User |
|
|
|
Hi Ed,
thanks, this worked fine.
Regards,
Joachim
Ed Merks schrieb:
> Joachim,
>
> It's not part of the component model. You can only get *and *set it
> through the DOM.
>
>
> Joachim Back wrote:
>> The specification http://www.w3.org/TR/xmlschema-1/ describes a field
>> 'id' at nearly each XSD Element, e.g. "xsd:attribute".
>> I don't find this field in the ECORE model xsd.ecore.
>>
>> My problem is that I want to read and write this field.
>> I have this XSD excerpt:
>> <xsd:attribute name="B" id="r19">
>> <xsd:simpleType>
>> <xsd:restriction base="xsd:string">
>> <xsd:minLength value="0" />
>> <xsd:maxLength value="10" />
>> </xsd:restriction>
>> </xsd:simpleType>
>> </xsd:attribute>
>>
>> I don't know how to read the value of the 'id' through the
>> XSDAttributeDeclaration but succeed via the field 'element:DOMElement'.
>> I don't know how to set the value of 'id'. I tried with filling the
>> XSDResourceImpl:setIntrinsicIDToEObjectMap(), but this has no effect
>> for XSDResourceImpl:save().
>> This map is also not filled at load time.
>> Is this a bug or is there another proposed way to read and write 'id'?
>>
>> Thanks,
>> Joachim
|
|
|
Re: How to access the ID of a XSDComponent [message #604145 is a reply to message #77530] |
Thu, 02 April 2009 13:50  |
Eclipse User |
|
|
|
This is a multi-part message in MIME format.
--------------090907000805030103020609
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit
Joachim,
It's not part of the component model. You can only get *and *set it
through the DOM.
Joachim Back wrote:
> The specification http://www.w3.org/TR/xmlschema-1/ describes a field
> 'id' at nearly each XSD Element, e.g. "xsd:attribute".
> I don't find this field in the ECORE model xsd.ecore.
>
> My problem is that I want to read and write this field.
> I have this XSD excerpt:
> <xsd:attribute name="B" id="r19">
> <xsd:simpleType>
> <xsd:restriction base="xsd:string">
> <xsd:minLength value="0" />
> <xsd:maxLength value="10" />
> </xsd:restriction>
> </xsd:simpleType>
> </xsd:attribute>
>
> I don't know how to read the value of the 'id' through the
> XSDAttributeDeclaration but succeed via the field 'element:DOMElement'.
> I don't know how to set the value of 'id'. I tried with filling the
> XSDResourceImpl:setIntrinsicIDToEObjectMap(), but this has no effect
> for XSDResourceImpl:save().
> This map is also not filled at load time.
> Is this a bug or is there another proposed way to read and write 'id'?
>
> Thanks,
> Joachim
--------------090907000805030103020609
Content-Type: text/html; charset=ISO-8859-15
Content-Transfer-Encoding: 8bit
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-15"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Joachim,<br>
<br>
It's not part of the component model.
|
|
|
Re: How to access the ID of a XSDComponent [message #604274 is a reply to message #77546] |
Wed, 22 July 2009 07:56  |
Eclipse User |
|
|
|
Hi Ed,
thanks, this worked fine.
Regards,
Joachim
Ed Merks schrieb:
> Joachim,
>
> It's not part of the component model. You can only get *and *set it
> through the DOM.
>
>
> Joachim Back wrote:
>> The specification http://www.w3.org/TR/xmlschema-1/ describes a field
>> 'id' at nearly each XSD Element, e.g. "xsd:attribute".
>> I don't find this field in the ECORE model xsd.ecore.
>>
>> My problem is that I want to read and write this field.
>> I have this XSD excerpt:
>> <xsd:attribute name="B" id="r19">
>> <xsd:simpleType>
>> <xsd:restriction base="xsd:string">
>> <xsd:minLength value="0" />
>> <xsd:maxLength value="10" />
>> </xsd:restriction>
>> </xsd:simpleType>
>> </xsd:attribute>
>>
>> I don't know how to read the value of the 'id' through the
>> XSDAttributeDeclaration but succeed via the field 'element:DOMElement'.
>> I don't know how to set the value of 'id'. I tried with filling the
>> XSDResourceImpl:setIntrinsicIDToEObjectMap(), but this has no effect
>> for XSDResourceImpl:save().
>> This map is also not filled at load time.
>> Is this a bug or is there another proposed way to read and write 'id'?
>>
>> Thanks,
>> Joachim
|
|
|
Powered by
FUDForum. Page generated in 0.06592 seconds