Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » XML Schema Definition (XSD) » How to access the ID of a XSDComponent
How to access the ID of a XSDComponent [message #77530] Thu, 02 April 2009 16:04 Go to next message
Joachim is currently offline Joachim
Messages: 16
Registered: July 2009
Junior Member
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 #77546 is a reply to message #77530] Thu, 02 April 2009 17:50 Go to previous messageGo to next message
Ed Merks is currently offline Ed Merks
Messages: 26152
Registered: July 2009
Senior Member
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 #78052 is a reply to message #77546] Wed, 22 July 2009 11:56 Go to previous message
Joachim is currently offline Joachim
Messages: 16
Registered: July 2009
Junior Member
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 17:50 Go to previous message
Ed Merks is currently offline Ed Merks
Messages: 26152
Registered: July 2009
Senior Member
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 11:56 Go to previous message
Joachim is currently offline Joachim
Messages: 16
Registered: July 2009
Junior Member
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
Previous Topic:XSDSimpleTypeDefinition::facetContents not sortable?
Next Topic:XSDSimpleTypeDefinition::facetContents not sortable?
Goto Forum:
  


Current Time: Fri Oct 31 09:58:31 GMT 2014

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

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