Home » Archived » XML Schema Definition (XSD) » Removing components from an XML schema
|
Re: Removing components from an XML schema [message #26383 is a reply to message #26345] |
Tue, 12 August 2003 15:09 |
Eclipse User |
|
|
|
Originally posted by: merks.ca.ibm.com
Hayden,
Yes, you can use XSDSchema.setIncrementalUpdate(false) to turn off the
expensive global updates and set it back to true, or call XSDSchema.update,
afterwards.
Hayden Marchant wrote:
> I am trying to prune an extremely large xsd by taking off unneeded
> branches of it. The way I am doing this is to load the schema into memory,
> and to remove the unwanted objects with the ECoreUtil.remove(EObject obj)
> method. I am then writing the new compact schema back to a file.
>
> In a small test case it works great. When I tried it with a real schema (a
> set of XML schemas > 700KB), the remove method calls went extremely
> slowly. It seems that every time remove is being called, the whole Schema
> is being analyzed which is a lengthy process. I have about 2500 items I
> need to remove, and each remove is taking about 1 second.
>
> Is there anyway I can turn off the validation process when removing?
>
> Thanks,
> Hayden Marchant,
> Unicorn Solutions Inc.
|
|
|
Re: Removing components from an XML schema [message #27820 is a reply to message #26383] |
Wed, 03 September 2003 14:36 |
Shane Curcuru Messages: 30 Registered: July 2009 |
Member |
|
|
This sounds like it should be a FAQ!
Presumably any large-scale schema modifications would go more quickly when
setIncrementalUpdate(false) is set. Is there a short and pithy warning
that you can attach to this state though? I imagine that while incremental
updates are off that the ECore magic that keeps all references running
right is not necessarily working. Can you shoot yourself in the foot by,
say, deleting an object from one side of a schema, and then trying to
access it through a reference from the other side of the schema?
Oh: does update() force setIncrementalUpdate(true) again, or do you still
need to do that yourself?
On Tue, 12 Aug 2003 11:09:56 -0400, Ed Merks <merks@ca.ibm.com> wrote:
> Hayden,
>
> Yes, you can use XSDSchema.setIncrementalUpdate(false) to turn off the
> expensive global updates and set it back to true, or call
> XSDSchema.update,
> afterwards.
--
Shane Curcuru
|
|
|
Re: Removing components from an XML schema [message #27940 is a reply to message #27820] |
Wed, 03 September 2003 16:40 |
Eclipse User |
|
|
|
Originally posted by: merks.ca.ibm.com
Shane,
The warning is that names will no longer be re-resolved and non-concrete
relations will no longer be recomputed. If you aren't relying on these to
drive your actions, it won't matter. I'm not sure how you'd actually be able
to injure yourself though...
Calling update is a one shot deal and doesn't affect whether incremental
updates will happen.
Shane Curcuru wrote:
> This sounds like it should be a FAQ!
>
> Presumably any large-scale schema modifications would go more quickly when
> setIncrementalUpdate(false) is set. Is there a short and pithy warning
> that you can attach to this state though? I imagine that while incremental
> updates are off that the ECore magic that keeps all references running
> right is not necessarily working. Can you shoot yourself in the foot by,
> say, deleting an object from one side of a schema, and then trying to
> access it through a reference from the other side of the schema?
>
> Oh: does update() force setIncrementalUpdate(true) again, or do you still
> need to do that yourself?
>
> On Tue, 12 Aug 2003 11:09:56 -0400, Ed Merks <merks@ca.ibm.com> wrote:
>
> > Hayden,
> >
> > Yes, you can use XSDSchema.setIncrementalUpdate(false) to turn off the
> > expensive global updates and set it back to true, or call
> > XSDSchema.update,
> > afterwards.
> --
> Shane Curcuru
|
|
|
Re: Removing components from an XML schema [message #575902 is a reply to message #26345] |
Tue, 12 August 2003 15:09 |
Ed Merks Messages: 33137 Registered: July 2009 |
Senior Member |
|
|
Hayden,
Yes, you can use XSDSchema.setIncrementalUpdate(false) to turn off the
expensive global updates and set it back to true, or call XSDSchema.update,
afterwards.
Hayden Marchant wrote:
> I am trying to prune an extremely large xsd by taking off unneeded
> branches of it. The way I am doing this is to load the schema into memory,
> and to remove the unwanted objects with the ECoreUtil.remove(EObject obj)
> method. I am then writing the new compact schema back to a file.
>
> In a small test case it works great. When I tried it with a real schema (a
> set of XML schemas > 700KB), the remove method calls went extremely
> slowly. It seems that every time remove is being called, the whole Schema
> is being analyzed which is a lengthy process. I have about 2500 items I
> need to remove, and each remove is taking about 1 second.
>
> Is there anyway I can turn off the validation process when removing?
>
> Thanks,
> Hayden Marchant,
> Unicorn Solutions Inc.
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Re: Removing components from an XML schema [message #576967 is a reply to message #26383] |
Wed, 03 September 2003 14:36 |
Shane Curcuru Messages: 30 Registered: July 2009 |
Member |
|
|
This sounds like it should be a FAQ!
Presumably any large-scale schema modifications would go more quickly when
setIncrementalUpdate(false) is set. Is there a short and pithy warning
that you can attach to this state though? I imagine that while incremental
updates are off that the ECore magic that keeps all references running
right is not necessarily working. Can you shoot yourself in the foot by,
say, deleting an object from one side of a schema, and then trying to
access it through a reference from the other side of the schema?
Oh: does update() force setIncrementalUpdate(true) again, or do you still
need to do that yourself?
On Tue, 12 Aug 2003 11:09:56 -0400, Ed Merks <merks@ca.ibm.com> wrote:
> Hayden,
>
> Yes, you can use XSDSchema.setIncrementalUpdate(false) to turn off the
> expensive global updates and set it back to true, or call
> XSDSchema.update,
> afterwards.
--
Shane Curcuru
|
|
|
Re: Removing components from an XML schema [message #577081 is a reply to message #27820] |
Wed, 03 September 2003 16:40 |
Ed Merks Messages: 33137 Registered: July 2009 |
Senior Member |
|
|
Shane,
The warning is that names will no longer be re-resolved and non-concrete
relations will no longer be recomputed. If you aren't relying on these to
drive your actions, it won't matter. I'm not sure how you'd actually be able
to injure yourself though...
Calling update is a one shot deal and doesn't affect whether incremental
updates will happen.
Shane Curcuru wrote:
> This sounds like it should be a FAQ!
>
> Presumably any large-scale schema modifications would go more quickly when
> setIncrementalUpdate(false) is set. Is there a short and pithy warning
> that you can attach to this state though? I imagine that while incremental
> updates are off that the ECore magic that keeps all references running
> right is not necessarily working. Can you shoot yourself in the foot by,
> say, deleting an object from one side of a schema, and then trying to
> access it through a reference from the other side of the schema?
>
> Oh: does update() force setIncrementalUpdate(true) again, or do you still
> need to do that yourself?
>
> On Tue, 12 Aug 2003 11:09:56 -0400, Ed Merks <merks@ca.ibm.com> wrote:
>
> > Hayden,
> >
> > Yes, you can use XSDSchema.setIncrementalUpdate(false) to turn off the
> > expensive global updates and set it back to true, or call
> > XSDSchema.update,
> > afterwards.
> --
> Shane Curcuru
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Goto Forum:
Current Time: Fri Apr 19 22:35:10 GMT 2024
Powered by FUDForum. Page generated in 0.03537 seconds
|