Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » XML Schema Definition (XSD) » removing global elements from XSDSchema
removing global elements from XSDSchema [message #53632] Tue, 28 September 2004 15:45 Go to next message
Eclipse UserFriend
Originally posted by: robinnt.us.ibm.com

When removing a global element from the XSDSchema will anonymous complex
types, particles, sequences, facets, and child elements be removed and
garbage collected or does each need to be explicitly removed from their
containers.

For example:

<xsd:element name=Address>
<xsd:complexType>
<vsequence>
<xsd:element name="street" type="string">
<xsd:element name="city" type="string">
<xsd:element name="state" type="string">
<xsd:element name="zip">
<xsd:simpleType>
<xsd:restriction base="xsd:positiveInteger">
<xsd:maxExclusive value="100000"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>


Is this code sufficient to remove the element "Address" and assure all the
referenced to the underlying objects have been removed so they can be
garbage collected.

xsdSchema.getContents.remove(elementAddress);

Otherwise, should I drill down through the underlying objects and remove
each individually to make sure all referenced have been removed so the objec
ts will be garbage collected.

Thanks.

Robin Noble-Thomas
Re: removing global elements from XSDSchema [message #53658 is a reply to message #53632] Tue, 28 September 2004 16:00 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: merks.ca.ibm.com

Robin,

It should be sufficient to remove a parent, since that will (typically)
result in all the children becoming unreachable and hence collectible.


Robin Noble-Thomas wrote:

>When removing a global element from the XSDSchema will anonymous complex
>types, particles, sequences, facets, and child elements be removed and
>garbage collected or does each need to be explicitly removed from their
>containers.
>
>For example:
>
><xsd:element name=Address>
> <xsd:complexType>
> <vsequence>
> <xsd:element name="street" type="string">
> <xsd:element name="city" type="string">
> <xsd:element name="state" type="string">
> <xsd:element name="zip">
> <xsd:simpleType>
> <xsd:restriction base="xsd:positiveInteger">
> <xsd:maxExclusive value="100000"/>
> </xsd:restriction>
> </xsd:simpleType>
> </xsd:element>
> </xsd:sequence>
> </xsd:complexType>
></xsd:element>
>
>
>Is this code sufficient to remove the element "Address" and assure all the
>referenced to the underlying objects have been removed so they can be
>garbage collected.
>
>xsdSchema.getContents.remove(elementAddress);
>
>Otherwise, should I drill down through the underlying objects and remove
>each individually to make sure all referenced have been removed so the objec
>ts will be garbage collected.
>
>Thanks.
>
>Robin Noble-Thomas
>
>
>
>
Re: removing global elements from XSDSchema [message #53760 is a reply to message #53658] Tue, 28 September 2004 20:56 Go to previous message
Eclipse UserFriend
Originally posted by: robinnt.us.ibm.com

Ok thank you.
Robin

"Ed Merks" <merks@ca.ibm.com> wrote in message
news:cjc1ho$qva$1@eclipse.org...
> Robin,
>
> It should be sufficient to remove a parent, since that will (typically)
> result in all the children becoming unreachable and hence collectible.
>
>
> Robin Noble-Thomas wrote:
>
> >When removing a global element from the XSDSchema will anonymous complex
> >types, particles, sequences, facets, and child elements be removed and
> >garbage collected or does each need to be explicitly removed from their
> >containers.
> >
> >For example:
> >
> ><xsd:element name=Address>
> > <xsd:complexType>
> > <vsequence>
> > <xsd:element name="street" type="string">
> > <xsd:element name="city" type="string">
> > <xsd:element name="state" type="string">
> > <xsd:element name="zip">
> > <xsd:simpleType>
> > <xsd:restriction base="xsd:positiveInteger">
> > <xsd:maxExclusive value="100000"/>
> > </xsd:restriction>
> > </xsd:simpleType>
> > </xsd:element>
> > </xsd:sequence>
> > </xsd:complexType>
> ></xsd:element>
> >
> >
> >Is this code sufficient to remove the element "Address" and assure all
the
> >referenced to the underlying objects have been removed so they can be
> >garbage collected.
> >
> >xsdSchema.getContents.remove(elementAddress);
> >
> >Otherwise, should I drill down through the underlying objects and remove
> >each individually to make sure all referenced have been removed so the
objec
> >ts will be garbage collected.
> >
> >Thanks.
> >
> >Robin Noble-Thomas
> >
> >
> >
> >
Re: removing global elements from XSDSchema [message #591911 is a reply to message #53632] Tue, 28 September 2004 16:00 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33141
Registered: July 2009
Senior Member
Robin,

It should be sufficient to remove a parent, since that will (typically)
result in all the children becoming unreachable and hence collectible.


Robin Noble-Thomas wrote:

>When removing a global element from the XSDSchema will anonymous complex
>types, particles, sequences, facets, and child elements be removed and
>garbage collected or does each need to be explicitly removed from their
>containers.
>
>For example:
>
><xsd:element name=Address>
> <xsd:complexType>
> <vsequence>
> <xsd:element name="street" type="string">
> <xsd:element name="city" type="string">
> <xsd:element name="state" type="string">
> <xsd:element name="zip">
> <xsd:simpleType>
> <xsd:restriction base="xsd:positiveInteger">
> <xsd:maxExclusive value="100000"/>
> </xsd:restriction>
> </xsd:simpleType>
> </xsd:element>
> </xsd:sequence>
> </xsd:complexType>
></xsd:element>
>
>
>Is this code sufficient to remove the element "Address" and assure all the
>referenced to the underlying objects have been removed so they can be
>garbage collected.
>
>xsdSchema.getContents.remove(elementAddress);
>
>Otherwise, should I drill down through the underlying objects and remove
>each individually to make sure all referenced have been removed so the objec
>ts will be garbage collected.
>
>Thanks.
>
>Robin Noble-Thomas
>
>
>
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: removing global elements from XSDSchema [message #591958 is a reply to message #53658] Tue, 28 September 2004 20:56 Go to previous message
Eclipse UserFriend
Originally posted by: robinnt.us.ibm.com

Ok thank you.
Robin

"Ed Merks" <merks@ca.ibm.com> wrote in message
news:cjc1ho$qva$1@eclipse.org...
> Robin,
>
> It should be sufficient to remove a parent, since that will (typically)
> result in all the children becoming unreachable and hence collectible.
>
>
> Robin Noble-Thomas wrote:
>
> >When removing a global element from the XSDSchema will anonymous complex
> >types, particles, sequences, facets, and child elements be removed and
> >garbage collected or does each need to be explicitly removed from their
> >containers.
> >
> >For example:
> >
> ><xsd:element name=Address>
> > <xsd:complexType>
> > <vsequence>
> > <xsd:element name="street" type="string">
> > <xsd:element name="city" type="string">
> > <xsd:element name="state" type="string">
> > <xsd:element name="zip">
> > <xsd:simpleType>
> > <xsd:restriction base="xsd:positiveInteger">
> > <xsd:maxExclusive value="100000"/>
> > </xsd:restriction>
> > </xsd:simpleType>
> > </xsd:element>
> > </xsd:sequence>
> > </xsd:complexType>
> ></xsd:element>
> >
> >
> >Is this code sufficient to remove the element "Address" and assure all
the
> >referenced to the underlying objects have been removed so they can be
> >garbage collected.
> >
> >xsdSchema.getContents.remove(elementAddress);
> >
> >Otherwise, should I drill down through the underlying objects and remove
> >each individually to make sure all referenced have been removed so the
objec
> >ts will be garbage collected.
> >
> >Thanks.
> >
> >Robin Noble-Thomas
> >
> >
> >
> >
Previous Topic:Parsing Question
Next Topic:Parsing Question
Goto Forum:
  


Current Time: Fri Apr 26 05:40:13 GMT 2024

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

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

Back to the top