Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » XML Schema Definition (XSD) » XSDResourceImpl.save help
XSDResourceImpl.save help [message #31999] Tue, 28 October 2003 17:10 Go to next message
Lance Phillips is currently offline Lance PhillipsFriend
Messages: 210
Registered: July 2009
Senior Member
Ed,
I'm working on an effort to read in some of our old xmi models into
eclipse. One of the models I'm working on is an XSD Simple Datatypes model.
It constists of a schema and a bunch of XSDSimpleTypes. The reader seems to
read everything in fine. I can iterate through the resouce after reading
everything into the XSDResource and verify that the read was successful.
However, when I try to save the resource many of the attributes are getting
lost. In particular, the baseType attributes are all getting lost and end
up as null. This model is completely self contained, so there is no issue
with imports.

Any ideas?

thanks,

lp
Re: XSDResourceImpl.save help [message #32034 is a reply to message #31999] Tue, 28 October 2003 18:53 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: merks.ca.ibm.com

Lance,

The name of the attribute is base, not baseType. Could that be the problem?

Lance Phillips wrote:

> Ed,
> I'm working on an effort to read in some of our old xmi models into
> eclipse. One of the models I'm working on is an XSD Simple Datatypes model.
> It constists of a schema and a bunch of XSDSimpleTypes. The reader seems to
> read everything in fine. I can iterate through the resouce after reading
> everything into the XSDResource and verify that the read was successful.
> However, when I try to save the resource many of the attributes are getting
> lost. In particular, the baseType attributes are all getting lost and end
> up as null. This model is completely self contained, so there is no issue
> with imports.
>
> Any ideas?
>
> thanks,
>
> lp
Re: XSDResourceImpl.save help [message #32068 is a reply to message #32034] Tue, 28 October 2003 18:57 Go to previous messageGo to next message
Lance Phillips is currently offline Lance PhillipsFriend
Messages: 210
Registered: July 2009
Senior Member
Nope... I was just using our terminology... I'm getting base="null". I
suspect this has something to do with targetNamespaces, but I can't figure
out how yet. I tried removing all target namespaces, which should work for
an entirely self contained schema, but that doesn't fix it either.

The other major item that is missing is all the facet info. I'm hoping
solving problem one, will solve problem 2, but I'm not overly optimistic at
this point.

thanks,

lp

"Ed Merks" <merks@ca.ibm.com> wrote in message
news:3F9EBB29.3779DBC0@ca.ibm.com...
> Lance,
>
> The name of the attribute is base, not baseType. Could that be the
problem?
>
> Lance Phillips wrote:
>
> > Ed,
> > I'm working on an effort to read in some of our old xmi models into
> > eclipse. One of the models I'm working on is an XSD Simple Datatypes
model.
> > It constists of a schema and a bunch of XSDSimpleTypes. The reader
seems to
> > read everything in fine. I can iterate through the resouce after
reading
> > everything into the XSDResource and verify that the read was successful.
> > However, when I try to save the resource many of the attributes are
getting
> > lost. In particular, the baseType attributes are all getting lost and
end
> > up as null. This model is completely self contained, so there is no
issue
> > with imports.
> >
> > Any ideas?
> >
> > thanks,
> >
> > lp
>
Re: XSDResourceImpl.save help [message #32104 is a reply to message #32068] Tue, 28 October 2003 19:08 Go to previous messageGo to next message
Lance Phillips is currently offline Lance PhillipsFriend
Messages: 210
Registered: July 2009
Senior Member
Can you tell me how the uri fragments are determined when writting out the
references? I tried putting a breakpoint in the XSDResourceImpl's
getURIFragment method, but it never gets hit.

thanks,

lp
"Lance Phillips" <lphillips@metamatrix.com> wrote in message
news:bnme5o$uih$1@eclipse.org...
> Nope... I was just using our terminology... I'm getting base="null". I
> suspect this has something to do with targetNamespaces, but I can't figure
> out how yet. I tried removing all target namespaces, which should work
for
> an entirely self contained schema, but that doesn't fix it either.
>
> The other major item that is missing is all the facet info. I'm hoping
> solving problem one, will solve problem 2, but I'm not overly optimistic
at
> this point.
>
> thanks,
>
> lp
>
> "Ed Merks" <merks@ca.ibm.com> wrote in message
> news:3F9EBB29.3779DBC0@ca.ibm.com...
> > Lance,
> >
> > The name of the attribute is base, not baseType. Could that be the
> problem?
> >
> > Lance Phillips wrote:
> >
> > > Ed,
> > > I'm working on an effort to read in some of our old xmi models
into
> > > eclipse. One of the models I'm working on is an XSD Simple Datatypes
> model.
> > > It constists of a schema and a bunch of XSDSimpleTypes. The reader
> seems to
> > > read everything in fine. I can iterate through the resouce after
> reading
> > > everything into the XSDResource and verify that the read was
successful.
> > > However, when I try to save the resource many of the attributes are
> getting
> > > lost. In particular, the baseType attributes are all getting lost and
> end
> > > up as null. This model is completely self contained, so there is no
> issue
> > > with imports.
> > >
> > > Any ideas?
> > >
> > > thanks,
> > >
> > > lp
> >
>
>
Re: XSDResourceImpl.save help [message #32140 is a reply to message #32068] Tue, 28 October 2003 19:40 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: merks.ca.ibm.com

Lance,

Of course showing me the schema would allow me to make more informed comments.
;-)


Lance Phillips wrote:

> Nope... I was just using our terminology... I'm getting base="null". I
> suspect this has something to do with targetNamespaces, but I can't figure
> out how yet. I tried removing all target namespaces, which should work for
> an entirely self contained schema, but that doesn't fix it either.
>
> The other major item that is missing is all the facet info. I'm hoping
> solving problem one, will solve problem 2, but I'm not overly optimistic at
> this point.
>
> thanks,
>
> lp
>
> "Ed Merks" <merks@ca.ibm.com> wrote in message
> news:3F9EBB29.3779DBC0@ca.ibm.com...
> > Lance,
> >
> > The name of the attribute is base, not baseType. Could that be the
> problem?
> >
> > Lance Phillips wrote:
> >
> > > Ed,
> > > I'm working on an effort to read in some of our old xmi models into
> > > eclipse. One of the models I'm working on is an XSD Simple Datatypes
> model.
> > > It constists of a schema and a bunch of XSDSimpleTypes. The reader
> seems to
> > > read everything in fine. I can iterate through the resouce after
> reading
> > > everything into the XSDResource and verify that the read was successful.
> > > However, when I try to save the resource many of the attributes are
> getting
> > > lost. In particular, the baseType attributes are all getting lost and
> end
> > > up as null. This model is completely self contained, so there is no
> issue
> > > with imports.
> > >
> > > Any ideas?
> > >
> > > thanks,
> > >
> > > lp
> >
Re: XSDResourceImpl.save help [message #32175 is a reply to message #32104] Tue, 28 October 2003 19:45 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: merks.ca.ibm.com

Lance,

I think you mean the get eURIFragmentSegment method. This method is only used
if you have an "XMI" reference into an XSD instance; it isn't used by the XSD
model to serialize it's own instances. Calls to niceSetAttributeURIValue are
used to produce the QName references that are used internally by the XSD model
to reference things...


Lance Phillips wrote:

> Can you tell me how the uri fragments are determined when writting out the
> references? I tried putting a breakpoint in the XSDResourceImpl's
> getURIFragment method, but it never gets hit.
>
> thanks,
>
> lp
> "Lance Phillips" <lphillips@metamatrix.com> wrote in message
> news:bnme5o$uih$1@eclipse.org...
> > Nope... I was just using our terminology... I'm getting base="null". I
> > suspect this has something to do with targetNamespaces, but I can't figure
> > out how yet. I tried removing all target namespaces, which should work
> for
> > an entirely self contained schema, but that doesn't fix it either.
> >
> > The other major item that is missing is all the facet info. I'm hoping
> > solving problem one, will solve problem 2, but I'm not overly optimistic
> at
> > this point.
> >
> > thanks,
> >
> > lp
> >
> > "Ed Merks" <merks@ca.ibm.com> wrote in message
> > news:3F9EBB29.3779DBC0@ca.ibm.com...
> > > Lance,
> > >
> > > The name of the attribute is base, not baseType. Could that be the
> > problem?
> > >
> > > Lance Phillips wrote:
> > >
> > > > Ed,
> > > > I'm working on an effort to read in some of our old xmi models
> into
> > > > eclipse. One of the models I'm working on is an XSD Simple Datatypes
> > model.
> > > > It constists of a schema and a bunch of XSDSimpleTypes. The reader
> > seems to
> > > > read everything in fine. I can iterate through the resouce after
> > reading
> > > > everything into the XSDResource and verify that the read was
> successful.
> > > > However, when I try to save the resource many of the attributes are
> > getting
> > > > lost. In particular, the baseType attributes are all getting lost and
> > end
> > > > up as null. This model is completely self contained, so there is no
> > issue
> > > > with imports.
> > > >
> > > > Any ideas?
> > > >
> > > > thanks,
> > > >
> > > > lp
> > >
> >
> >
Re: XSDResourceImpl.save help [message #32210 is a reply to message #32068] Tue, 28 October 2003 20:10 Go to previous messageGo to next message
Lance Phillips is currently offline Lance PhillipsFriend
Messages: 210
Registered: July 2009
Senior Member
OK... figured out the base type problem. I was not setting the names of the
types until I was done reading everything in. I did it as a post processing
step. Thus, all the uris where getting created as Q1:null, even though the
type referenced the correct entity.

Shouldn't setting the name of the type have caused the corresponding uri
values to be recalculated?

thanks,

lp

"Lance Phillips" <lphillips@metamatrix.com> wrote in message
news:bnme5o$uih$1@eclipse.org...
> Nope... I was just using our terminology... I'm getting base="null". I
> suspect this has something to do with targetNamespaces, but I can't figure
> out how yet. I tried removing all target namespaces, which should work
for
> an entirely self contained schema, but that doesn't fix it either.
>
> The other major item that is missing is all the facet info. I'm hoping
> solving problem one, will solve problem 2, but I'm not overly optimistic
at
> this point.
>
> thanks,
>
> lp
>
> "Ed Merks" <merks@ca.ibm.com> wrote in message
> news:3F9EBB29.3779DBC0@ca.ibm.com...
> > Lance,
> >
> > The name of the attribute is base, not baseType. Could that be the
> problem?
> >
> > Lance Phillips wrote:
> >
> > > Ed,
> > > I'm working on an effort to read in some of our old xmi models
into
> > > eclipse. One of the models I'm working on is an XSD Simple Datatypes
> model.
> > > It constists of a schema and a bunch of XSDSimpleTypes. The reader
> seems to
> > > read everything in fine. I can iterate through the resouce after
> reading
> > > everything into the XSDResource and verify that the read was
successful.
> > > However, when I try to save the resource many of the attributes are
> getting
> > > lost. In particular, the baseType attributes are all getting lost and
> end
> > > up as null. This model is completely self contained, so there is no
> issue
> > > with imports.
> > >
> > > Any ideas?
> > >
> > > thanks,
> > >
> > > lp
> >
>
>
Re: XSDResourceImpl.save help [message #32245 is a reply to message #32210] Tue, 28 October 2003 20:24 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: merks.ca.ibm.com

Lance,

Doing the dependency analysis after a name change to update the serialization of
all references would be possible, but the model doesn't do that right now.
Calling XSDConcrete.updateElement on your schema at the end is a brute force way
to ensure that everything is up to date.


Lance Phillips wrote:

> OK... figured out the base type problem. I was not setting the names of the
> types until I was done reading everything in. I did it as a post processing
> step. Thus, all the uris where getting created as Q1:null, even though the
> type referenced the correct entity.
>
> Shouldn't setting the name of the type have caused the corresponding uri
> values to be recalculated?
>
> thanks,
>
> lp
>
> "Lance Phillips" <lphillips@metamatrix.com> wrote in message
> news:bnme5o$uih$1@eclipse.org...
> > Nope... I was just using our terminology... I'm getting base="null". I
> > suspect this has something to do with targetNamespaces, but I can't figure
> > out how yet. I tried removing all target namespaces, which should work
> for
> > an entirely self contained schema, but that doesn't fix it either.
> >
> > The other major item that is missing is all the facet info. I'm hoping
> > solving problem one, will solve problem 2, but I'm not overly optimistic
> at
> > this point.
> >
> > thanks,
> >
> > lp
> >
> > "Ed Merks" <merks@ca.ibm.com> wrote in message
> > news:3F9EBB29.3779DBC0@ca.ibm.com...
> > > Lance,
> > >
> > > The name of the attribute is base, not baseType. Could that be the
> > problem?
> > >
> > > Lance Phillips wrote:
> > >
> > > > Ed,
> > > > I'm working on an effort to read in some of our old xmi models
> into
> > > > eclipse. One of the models I'm working on is an XSD Simple Datatypes
> > model.
> > > > It constists of a schema and a bunch of XSDSimpleTypes. The reader
> > seems to
> > > > read everything in fine. I can iterate through the resouce after
> > reading
> > > > everything into the XSDResource and verify that the read was
> successful.
> > > > However, when I try to save the resource many of the attributes are
> > getting
> > > > lost. In particular, the baseType attributes are all getting lost and
> > end
> > > > up as null. This model is completely self contained, so there is no
> > issue
> > > > with imports.
> > > >
> > > > Any ideas?
> > > >
> > > > thanks,
> > > >
> > > > lp
> > >
> >
> >
Re: XSDResourceImpl.save help [message #32280 is a reply to message #32245] Tue, 28 October 2003 20:30 Go to previous messageGo to next message
Lance Phillips is currently offline Lance PhillipsFriend
Messages: 210
Registered: July 2009
Senior Member
I assume the updateElement on the schema element is brutally slow?

I guess, my question would be, what actions should we take to update all our
uris after we change the name of a type entity? I assume you would have the
same problem with Attribute, Group and Element if you renamed them and they
were referenced by a like entity? Even if there was some form of update to
execute, it would only be successful for entities that are currently loaded
in the workspace? I don't think I like the direction this conversation is
going ;) Now you know why we use uuids instead of uris... we don't break
for anything except a delete (which is expected behavior) ;)

lp
"Ed Merks" <merks@ca.ibm.com> wrote in message
news:3F9ED069.A7758857@ca.ibm.com...
> Lance,
>
> Doing the dependency analysis after a name change to update the
serialization of
> all references would be possible, but the model doesn't do that right now.
> Calling XSDConcrete.updateElement on your schema at the end is a brute
force way
> to ensure that everything is up to date.
>
>
> Lance Phillips wrote:
>
> > OK... figured out the base type problem. I was not setting the names of
the
> > types until I was done reading everything in. I did it as a post
processing
> > step. Thus, all the uris where getting created as Q1:null, even though
the
> > type referenced the correct entity.
> >
> > Shouldn't setting the name of the type have caused the corresponding uri
> > values to be recalculated?
> >
> > thanks,
> >
> > lp
> >
> > "Lance Phillips" <lphillips@metamatrix.com> wrote in message
> > news:bnme5o$uih$1@eclipse.org...
> > > Nope... I was just using our terminology... I'm getting base="null".
I
> > > suspect this has something to do with targetNamespaces, but I can't
figure
> > > out how yet. I tried removing all target namespaces, which should
work
> > for
> > > an entirely self contained schema, but that doesn't fix it either.
> > >
> > > The other major item that is missing is all the facet info. I'm
hoping
> > > solving problem one, will solve problem 2, but I'm not overly
optimistic
> > at
> > > this point.
> > >
> > > thanks,
> > >
> > > lp
> > >
> > > "Ed Merks" <merks@ca.ibm.com> wrote in message
> > > news:3F9EBB29.3779DBC0@ca.ibm.com...
> > > > Lance,
> > > >
> > > > The name of the attribute is base, not baseType. Could that be the
> > > problem?
> > > >
> > > > Lance Phillips wrote:
> > > >
> > > > > Ed,
> > > > > I'm working on an effort to read in some of our old xmi models
> > into
> > > > > eclipse. One of the models I'm working on is an XSD Simple
Datatypes
> > > model.
> > > > > It constists of a schema and a bunch of XSDSimpleTypes. The
reader
> > > seems to
> > > > > read everything in fine. I can iterate through the resouce after
> > > reading
> > > > > everything into the XSDResource and verify that the read was
> > successful.
> > > > > However, when I try to save the resource many of the attributes
are
> > > getting
> > > > > lost. In particular, the baseType attributes are all getting lost
and
> > > end
> > > > > up as null. This model is completely self contained, so there is
no
> > > issue
> > > > > with imports.
> > > > >
> > > > > Any ideas?
> > > > >
> > > > > thanks,
> > > > >
> > > > > lp
> > > >
> > >
> > >
>
Re: XSDResourceImpl.save help [message #32315 is a reply to message #32280] Tue, 28 October 2003 20:44 Go to previous message
Eclipse UserFriend
Originally posted by: merks.ca.ibm.com

Lance,

Definitely calling updateElement will have a significant cost. Your question
now is how to handle a general rename. You could use
XSDUtil.UsageCrossReferencer to find all uses and do a shallow updateElement,
i.e., updateElement(false), on each use. All the other named components will
have the same type of issue. Files that aren't loaded will clearly not be
updated. UUIDs have their benefits, but producing human readable results isn't
one of them. ;-)


Lance Phillips wrote:

> I assume the updateElement on the schema element is brutally slow?
>
> I guess, my question would be, what actions should we take to update all our
> uris after we change the name of a type entity? I assume you would have the
> same problem with Attribute, Group and Element if you renamed them and they
> were referenced by a like entity? Even if there was some form of update to
> execute, it would only be successful for entities that are currently loaded
> in the workspace? I don't think I like the direction this conversation is
> going ;) Now you know why we use uuids instead of uris... we don't break
> for anything except a delete (which is expected behavior) ;)
>
> lp
> "Ed Merks" <merks@ca.ibm.com> wrote in message
> news:3F9ED069.A7758857@ca.ibm.com...
> > Lance,
> >
> > Doing the dependency analysis after a name change to update the
> serialization of
> > all references would be possible, but the model doesn't do that right now.
> > Calling XSDConcrete.updateElement on your schema at the end is a brute
> force way
> > to ensure that everything is up to date.
> >
> >
> > Lance Phillips wrote:
> >
> > > OK... figured out the base type problem. I was not setting the names of
> the
> > > types until I was done reading everything in. I did it as a post
> processing
> > > step. Thus, all the uris where getting created as Q1:null, even though
> the
> > > type referenced the correct entity.
> > >
> > > Shouldn't setting the name of the type have caused the corresponding uri
> > > values to be recalculated?
> > >
> > > thanks,
> > >
> > > lp
> > >
> > > "Lance Phillips" <lphillips@metamatrix.com> wrote in message
> > > news:bnme5o$uih$1@eclipse.org...
> > > > Nope... I was just using our terminology... I'm getting base="null".
> I
> > > > suspect this has something to do with targetNamespaces, but I can't
> figure
> > > > out how yet. I tried removing all target namespaces, which should
> work
> > > for
> > > > an entirely self contained schema, but that doesn't fix it either.
> > > >
> > > > The other major item that is missing is all the facet info. I'm
> hoping
> > > > solving problem one, will solve problem 2, but I'm not overly
> optimistic
> > > at
> > > > this point.
> > > >
> > > > thanks,
> > > >
> > > > lp
> > > >
> > > > "Ed Merks" <merks@ca.ibm.com> wrote in message
> > > > news:3F9EBB29.3779DBC0@ca.ibm.com...
> > > > > Lance,
> > > > >
> > > > > The name of the attribute is base, not baseType. Could that be the
> > > > problem?
> > > > >
> > > > > Lance Phillips wrote:
> > > > >
> > > > > > Ed,
> > > > > > I'm working on an effort to read in some of our old xmi models
> > > into
> > > > > > eclipse. One of the models I'm working on is an XSD Simple
> Datatypes
> > > > model.
> > > > > > It constists of a schema and a bunch of XSDSimpleTypes. The
> reader
> > > > seems to
> > > > > > read everything in fine. I can iterate through the resouce after
> > > > reading
> > > > > > everything into the XSDResource and verify that the read was
> > > successful.
> > > > > > However, when I try to save the resource many of the attributes
> are
> > > > getting
> > > > > > lost. In particular, the baseType attributes are all getting lost
> and
> > > > end
> > > > > > up as null. This model is completely self contained, so there is
> no
> > > > issue
> > > > > > with imports.
> > > > > >
> > > > > > Any ideas?
> > > > > >
> > > > > > thanks,
> > > > > >
> > > > > > lp
> > > > >
> > > >
> > > >
> >
Re: XSDResourceImpl.save help [message #579982 is a reply to message #31999] Tue, 28 October 2003 18:53 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 31366
Registered: July 2009
Senior Member
Lance,

The name of the attribute is base, not baseType. Could that be the problem?

Lance Phillips wrote:

> Ed,
> I'm working on an effort to read in some of our old xmi models into
> eclipse. One of the models I'm working on is an XSD Simple Datatypes model.
> It constists of a schema and a bunch of XSDSimpleTypes. The reader seems to
> read everything in fine. I can iterate through the resouce after reading
> everything into the XSDResource and verify that the read was successful.
> However, when I try to save the resource many of the attributes are getting
> lost. In particular, the baseType attributes are all getting lost and end
> up as null. This model is completely self contained, so there is no issue
> with imports.
>
> Any ideas?
>
> thanks,
>
> lp


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: XSDResourceImpl.save help [message #580003 is a reply to message #32034] Tue, 28 October 2003 18:57 Go to previous message
Lance Phillips is currently offline Lance PhillipsFriend
Messages: 210
Registered: July 2009
Senior Member
Nope... I was just using our terminology... I'm getting base="null". I
suspect this has something to do with targetNamespaces, but I can't figure
out how yet. I tried removing all target namespaces, which should work for
an entirely self contained schema, but that doesn't fix it either.

The other major item that is missing is all the facet info. I'm hoping
solving problem one, will solve problem 2, but I'm not overly optimistic at
this point.

thanks,

lp

"Ed Merks" <merks@ca.ibm.com> wrote in message
news:3F9EBB29.3779DBC0@ca.ibm.com...
> Lance,
>
> The name of the attribute is base, not baseType. Could that be the
problem?
>
> Lance Phillips wrote:
>
> > Ed,
> > I'm working on an effort to read in some of our old xmi models into
> > eclipse. One of the models I'm working on is an XSD Simple Datatypes
model.
> > It constists of a schema and a bunch of XSDSimpleTypes. The reader
seems to
> > read everything in fine. I can iterate through the resouce after
reading
> > everything into the XSDResource and verify that the read was successful.
> > However, when I try to save the resource many of the attributes are
getting
> > lost. In particular, the baseType attributes are all getting lost and
end
> > up as null. This model is completely self contained, so there is no
issue
> > with imports.
> >
> > Any ideas?
> >
> > thanks,
> >
> > lp
>
Re: XSDResourceImpl.save help [message #580024 is a reply to message #32068] Tue, 28 October 2003 19:08 Go to previous message
Lance Phillips is currently offline Lance PhillipsFriend
Messages: 210
Registered: July 2009
Senior Member
Can you tell me how the uri fragments are determined when writting out the
references? I tried putting a breakpoint in the XSDResourceImpl's
getURIFragment method, but it never gets hit.

thanks,

lp
"Lance Phillips" <lphillips@metamatrix.com> wrote in message
news:bnme5o$uih$1@eclipse.org...
> Nope... I was just using our terminology... I'm getting base="null". I
> suspect this has something to do with targetNamespaces, but I can't figure
> out how yet. I tried removing all target namespaces, which should work
for
> an entirely self contained schema, but that doesn't fix it either.
>
> The other major item that is missing is all the facet info. I'm hoping
> solving problem one, will solve problem 2, but I'm not overly optimistic
at
> this point.
>
> thanks,
>
> lp
>
> "Ed Merks" <merks@ca.ibm.com> wrote in message
> news:3F9EBB29.3779DBC0@ca.ibm.com...
> > Lance,
> >
> > The name of the attribute is base, not baseType. Could that be the
> problem?
> >
> > Lance Phillips wrote:
> >
> > > Ed,
> > > I'm working on an effort to read in some of our old xmi models
into
> > > eclipse. One of the models I'm working on is an XSD Simple Datatypes
> model.
> > > It constists of a schema and a bunch of XSDSimpleTypes. The reader
> seems to
> > > read everything in fine. I can iterate through the resouce after
> reading
> > > everything into the XSDResource and verify that the read was
successful.
> > > However, when I try to save the resource many of the attributes are
> getting
> > > lost. In particular, the baseType attributes are all getting lost and
> end
> > > up as null. This model is completely self contained, so there is no
> issue
> > > with imports.
> > >
> > > Any ideas?
> > >
> > > thanks,
> > >
> > > lp
> >
>
>
Re: XSDResourceImpl.save help [message #580066 is a reply to message #32068] Tue, 28 October 2003 19:40 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 31366
Registered: July 2009
Senior Member
Lance,

Of course showing me the schema would allow me to make more informed comments.
;-)


Lance Phillips wrote:

> Nope... I was just using our terminology... I'm getting base="null". I
> suspect this has something to do with targetNamespaces, but I can't figure
> out how yet. I tried removing all target namespaces, which should work for
> an entirely self contained schema, but that doesn't fix it either.
>
> The other major item that is missing is all the facet info. I'm hoping
> solving problem one, will solve problem 2, but I'm not overly optimistic at
> this point.
>
> thanks,
>
> lp
>
> "Ed Merks" <merks@ca.ibm.com> wrote in message
> news:3F9EBB29.3779DBC0@ca.ibm.com...
> > Lance,
> >
> > The name of the attribute is base, not baseType. Could that be the
> problem?
> >
> > Lance Phillips wrote:
> >
> > > Ed,
> > > I'm working on an effort to read in some of our old xmi models into
> > > eclipse. One of the models I'm working on is an XSD Simple Datatypes
> model.
> > > It constists of a schema and a bunch of XSDSimpleTypes. The reader
> seems to
> > > read everything in fine. I can iterate through the resouce after
> reading
> > > everything into the XSDResource and verify that the read was successful.
> > > However, when I try to save the resource many of the attributes are
> getting
> > > lost. In particular, the baseType attributes are all getting lost and
> end
> > > up as null. This model is completely self contained, so there is no
> issue
> > > with imports.
> > >
> > > Any ideas?
> > >
> > > thanks,
> > >
> > > lp
> >


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: XSDResourceImpl.save help [message #580093 is a reply to message #32104] Tue, 28 October 2003 19:45 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 31366
Registered: July 2009
Senior Member
Lance,

I think you mean the get eURIFragmentSegment method. This method is only used
if you have an "XMI" reference into an XSD instance; it isn't used by the XSD
model to serialize it's own instances. Calls to niceSetAttributeURIValue are
used to produce the QName references that are used internally by the XSD model
to reference things...


Lance Phillips wrote:

> Can you tell me how the uri fragments are determined when writting out the
> references? I tried putting a breakpoint in the XSDResourceImpl's
> getURIFragment method, but it never gets hit.
>
> thanks,
>
> lp
> "Lance Phillips" <lphillips@metamatrix.com> wrote in message
> news:bnme5o$uih$1@eclipse.org...
> > Nope... I was just using our terminology... I'm getting base="null". I
> > suspect this has something to do with targetNamespaces, but I can't figure
> > out how yet. I tried removing all target namespaces, which should work
> for
> > an entirely self contained schema, but that doesn't fix it either.
> >
> > The other major item that is missing is all the facet info. I'm hoping
> > solving problem one, will solve problem 2, but I'm not overly optimistic
> at
> > this point.
> >
> > thanks,
> >
> > lp
> >
> > "Ed Merks" <merks@ca.ibm.com> wrote in message
> > news:3F9EBB29.3779DBC0@ca.ibm.com...
> > > Lance,
> > >
> > > The name of the attribute is base, not baseType. Could that be the
> > problem?
> > >
> > > Lance Phillips wrote:
> > >
> > > > Ed,
> > > > I'm working on an effort to read in some of our old xmi models
> into
> > > > eclipse. One of the models I'm working on is an XSD Simple Datatypes
> > model.
> > > > It constists of a schema and a bunch of XSDSimpleTypes. The reader
> > seems to
> > > > read everything in fine. I can iterate through the resouce after
> > reading
> > > > everything into the XSDResource and verify that the read was
> successful.
> > > > However, when I try to save the resource many of the attributes are
> > getting
> > > > lost. In particular, the baseType attributes are all getting lost and
> > end
> > > > up as null. This model is completely self contained, so there is no
> > issue
> > > > with imports.
> > > >
> > > > Any ideas?
> > > >
> > > > thanks,
> > > >
> > > > lp
> > >
> >
> >


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: XSDResourceImpl.save help [message #580113 is a reply to message #32068] Tue, 28 October 2003 20:10 Go to previous message
Lance Phillips is currently offline Lance PhillipsFriend
Messages: 210
Registered: July 2009
Senior Member
OK... figured out the base type problem. I was not setting the names of the
types until I was done reading everything in. I did it as a post processing
step. Thus, all the uris where getting created as Q1:null, even though the
type referenced the correct entity.

Shouldn't setting the name of the type have caused the corresponding uri
values to be recalculated?

thanks,

lp

"Lance Phillips" <lphillips@metamatrix.com> wrote in message
news:bnme5o$uih$1@eclipse.org...
> Nope... I was just using our terminology... I'm getting base="null". I
> suspect this has something to do with targetNamespaces, but I can't figure
> out how yet. I tried removing all target namespaces, which should work
for
> an entirely self contained schema, but that doesn't fix it either.
>
> The other major item that is missing is all the facet info. I'm hoping
> solving problem one, will solve problem 2, but I'm not overly optimistic
at
> this point.
>
> thanks,
>
> lp
>
> "Ed Merks" <merks@ca.ibm.com> wrote in message
> news:3F9EBB29.3779DBC0@ca.ibm.com...
> > Lance,
> >
> > The name of the attribute is base, not baseType. Could that be the
> problem?
> >
> > Lance Phillips wrote:
> >
> > > Ed,
> > > I'm working on an effort to read in some of our old xmi models
into
> > > eclipse. One of the models I'm working on is an XSD Simple Datatypes
> model.
> > > It constists of a schema and a bunch of XSDSimpleTypes. The reader
> seems to
> > > read everything in fine. I can iterate through the resouce after
> reading
> > > everything into the XSDResource and verify that the read was
successful.
> > > However, when I try to save the resource many of the attributes are
> getting
> > > lost. In particular, the baseType attributes are all getting lost and
> end
> > > up as null. This model is completely self contained, so there is no
> issue
> > > with imports.
> > >
> > > Any ideas?
> > >
> > > thanks,
> > >
> > > lp
> >
>
>
Re: XSDResourceImpl.save help [message #580145 is a reply to message #32210] Tue, 28 October 2003 20:24 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 31366
Registered: July 2009
Senior Member
Lance,

Doing the dependency analysis after a name change to update the serialization of
all references would be possible, but the model doesn't do that right now.
Calling XSDConcrete.updateElement on your schema at the end is a brute force way
to ensure that everything is up to date.


Lance Phillips wrote:

> OK... figured out the base type problem. I was not setting the names of the
> types until I was done reading everything in. I did it as a post processing
> step. Thus, all the uris where getting created as Q1:null, even though the
> type referenced the correct entity.
>
> Shouldn't setting the name of the type have caused the corresponding uri
> values to be recalculated?
>
> thanks,
>
> lp
>
> "Lance Phillips" <lphillips@metamatrix.com> wrote in message
> news:bnme5o$uih$1@eclipse.org...
> > Nope... I was just using our terminology... I'm getting base="null". I
> > suspect this has something to do with targetNamespaces, but I can't figure
> > out how yet. I tried removing all target namespaces, which should work
> for
> > an entirely self contained schema, but that doesn't fix it either.
> >
> > The other major item that is missing is all the facet info. I'm hoping
> > solving problem one, will solve problem 2, but I'm not overly optimistic
> at
> > this point.
> >
> > thanks,
> >
> > lp
> >
> > "Ed Merks" <merks@ca.ibm.com> wrote in message
> > news:3F9EBB29.3779DBC0@ca.ibm.com...
> > > Lance,
> > >
> > > The name of the attribute is base, not baseType. Could that be the
> > problem?
> > >
> > > Lance Phillips wrote:
> > >
> > > > Ed,
> > > > I'm working on an effort to read in some of our old xmi models
> into
> > > > eclipse. One of the models I'm working on is an XSD Simple Datatypes
> > model.
> > > > It constists of a schema and a bunch of XSDSimpleTypes. The reader
> > seems to
> > > > read everything in fine. I can iterate through the resouce after
> > reading
> > > > everything into the XSDResource and verify that the read was
> successful.
> > > > However, when I try to save the resource many of the attributes are
> > getting
> > > > lost. In particular, the baseType attributes are all getting lost and
> > end
> > > > up as null. This model is completely self contained, so there is no
> > issue
> > > > with imports.
> > > >
> > > > Any ideas?
> > > >
> > > > thanks,
> > > >
> > > > lp
> > >
> >
> >


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: XSDResourceImpl.save help [message #580166 is a reply to message #32245] Tue, 28 October 2003 20:30 Go to previous message
Lance Phillips is currently offline Lance PhillipsFriend
Messages: 210
Registered: July 2009
Senior Member
I assume the updateElement on the schema element is brutally slow?

I guess, my question would be, what actions should we take to update all our
uris after we change the name of a type entity? I assume you would have the
same problem with Attribute, Group and Element if you renamed them and they
were referenced by a like entity? Even if there was some form of update to
execute, it would only be successful for entities that are currently loaded
in the workspace? I don't think I like the direction this conversation is
going ;) Now you know why we use uuids instead of uris... we don't break
for anything except a delete (which is expected behavior) ;)

lp
"Ed Merks" <merks@ca.ibm.com> wrote in message
news:3F9ED069.A7758857@ca.ibm.com...
> Lance,
>
> Doing the dependency analysis after a name change to update the
serialization of
> all references would be possible, but the model doesn't do that right now.
> Calling XSDConcrete.updateElement on your schema at the end is a brute
force way
> to ensure that everything is up to date.
>
>
> Lance Phillips wrote:
>
> > OK... figured out the base type problem. I was not setting the names of
the
> > types until I was done reading everything in. I did it as a post
processing
> > step. Thus, all the uris where getting created as Q1:null, even though
the
> > type referenced the correct entity.
> >
> > Shouldn't setting the name of the type have caused the corresponding uri
> > values to be recalculated?
> >
> > thanks,
> >
> > lp
> >
> > "Lance Phillips" <lphillips@metamatrix.com> wrote in message
> > news:bnme5o$uih$1@eclipse.org...
> > > Nope... I was just using our terminology... I'm getting base="null".
I
> > > suspect this has something to do with targetNamespaces, but I can't
figure
> > > out how yet. I tried removing all target namespaces, which should
work
> > for
> > > an entirely self contained schema, but that doesn't fix it either.
> > >
> > > The other major item that is missing is all the facet info. I'm
hoping
> > > solving problem one, will solve problem 2, but I'm not overly
optimistic
> > at
> > > this point.
> > >
> > > thanks,
> > >
> > > lp
> > >
> > > "Ed Merks" <merks@ca.ibm.com> wrote in message
> > > news:3F9EBB29.3779DBC0@ca.ibm.com...
> > > > Lance,
> > > >
> > > > The name of the attribute is base, not baseType. Could that be the
> > > problem?
> > > >
> > > > Lance Phillips wrote:
> > > >
> > > > > Ed,
> > > > > I'm working on an effort to read in some of our old xmi models
> > into
> > > > > eclipse. One of the models I'm working on is an XSD Simple
Datatypes
> > > model.
> > > > > It constists of a schema and a bunch of XSDSimpleTypes. The
reader
> > > seems to
> > > > > read everything in fine. I can iterate through the resouce after
> > > reading
> > > > > everything into the XSDResource and verify that the read was
> > successful.
> > > > > However, when I try to save the resource many of the attributes
are
> > > getting
> > > > > lost. In particular, the baseType attributes are all getting lost
and
> > > end
> > > > > up as null. This model is completely self contained, so there is
no
> > > issue
> > > > > with imports.
> > > > >
> > > > > Any ideas?
> > > > >
> > > > > thanks,
> > > > >
> > > > > lp
> > > >
> > >
> > >
>
Re: XSDResourceImpl.save help [message #580187 is a reply to message #32280] Tue, 28 October 2003 20:44 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 31366
Registered: July 2009
Senior Member
Lance,

Definitely calling updateElement will have a significant cost. Your question
now is how to handle a general rename. You could use
XSDUtil.UsageCrossReferencer to find all uses and do a shallow updateElement,
i.e., updateElement(false), on each use. All the other named components will
have the same type of issue. Files that aren't loaded will clearly not be
updated. UUIDs have their benefits, but producing human readable results isn't
one of them. ;-)


Lance Phillips wrote:

> I assume the updateElement on the schema element is brutally slow?
>
> I guess, my question would be, what actions should we take to update all our
> uris after we change the name of a type entity? I assume you would have the
> same problem with Attribute, Group and Element if you renamed them and they
> were referenced by a like entity? Even if there was some form of update to
> execute, it would only be successful for entities that are currently loaded
> in the workspace? I don't think I like the direction this conversation is
> going ;) Now you know why we use uuids instead of uris... we don't break
> for anything except a delete (which is expected behavior) ;)
>
> lp
> "Ed Merks" <merks@ca.ibm.com> wrote in message
> news:3F9ED069.A7758857@ca.ibm.com...
> > Lance,
> >
> > Doing the dependency analysis after a name change to update the
> serialization of
> > all references would be possible, but the model doesn't do that right now.
> > Calling XSDConcrete.updateElement on your schema at the end is a brute
> force way
> > to ensure that everything is up to date.
> >
> >
> > Lance Phillips wrote:
> >
> > > OK... figured out the base type problem. I was not setting the names of
> the
> > > types until I was done reading everything in. I did it as a post
> processing
> > > step. Thus, all the uris where getting created as Q1:null, even though
> the
> > > type referenced the correct entity.
> > >
> > > Shouldn't setting the name of the type have caused the corresponding uri
> > > values to be recalculated?
> > >
> > > thanks,
> > >
> > > lp
> > >
> > > "Lance Phillips" <lphillips@metamatrix.com> wrote in message
> > > news:bnme5o$uih$1@eclipse.org...
> > > > Nope... I was just using our terminology... I'm getting base="null".
> I
> > > > suspect this has something to do with targetNamespaces, but I can't
> figure
> > > > out how yet. I tried removing all target namespaces, which should
> work
> > > for
> > > > an entirely self contained schema, but that doesn't fix it either.
> > > >
> > > > The other major item that is missing is all the facet info. I'm
> hoping
> > > > solving problem one, will solve problem 2, but I'm not overly
> optimistic
> > > at
> > > > this point.
> > > >
> > > > thanks,
> > > >
> > > > lp
> > > >
> > > > "Ed Merks" <merks@ca.ibm.com> wrote in message
> > > > news:3F9EBB29.3779DBC0@ca.ibm.com...
> > > > > Lance,
> > > > >
> > > > > The name of the attribute is base, not baseType. Could that be the
> > > > problem?
> > > > >
> > > > > Lance Phillips wrote:
> > > > >
> > > > > > Ed,
> > > > > > I'm working on an effort to read in some of our old xmi models
> > > into
> > > > > > eclipse. One of the models I'm working on is an XSD Simple
> Datatypes
> > > > model.
> > > > > > It constists of a schema and a bunch of XSDSimpleTypes. The
> reader
> > > > seems to
> > > > > > read everything in fine. I can iterate through the resouce after
> > > > reading
> > > > > > everything into the XSDResource and verify that the read was
> > > successful.
> > > > > > However, when I try to save the resource many of the attributes
> are
> > > > getting
> > > > > > lost. In particular, the baseType attributes are all getting lost
> and
> > > > end
> > > > > > up as null. This model is completely self contained, so there is
> no
> > > > issue
> > > > > > with imports.
> > > > > >
> > > > > > Any ideas?
> > > > > >
> > > > > > thanks,
> > > > > >
> > > > > > lp
> > > > >
> > > >
> > > >
> >


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:XSDResourceImpl.save help
Next Topic:Next issue...
Goto Forum:
  


Current Time: Wed Aug 12 21:46:01 GMT 2020

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

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

Back to the top