Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » XML Schema Definition (XSD) » XSDSchema serialization
XSDSchema serialization [message #44770] Tue, 18 May 2004 15:30 Go to next message
Rodolfo Botto is currently offline Rodolfo BottoFriend
Messages: 2
Registered: July 2009
Junior Member
Is there a chance to serialize an XSDSchema ? I having performance trouble
with XSDSchema instanciation from DOM, and in my case, can be avoided if I
can serialize and XSDSchema.
Re: XSDSchema serialization [message #44807 is a reply to message #44770] Tue, 18 May 2004 15:40 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: merks.ca.ibm.com

Rodolfo,

Doing xsdSchema.eResource().save(System.out, null) should serialize your
instance.


Rodolfo Botto wrote:

> Is there a chance to serialize an XSDSchema ? I having performance trouble
> with XSDSchema instanciation from DOM, and in my case, can be avoided if I
> can serialize and XSDSchema.
SubstitutionGroups Help! [message #44889 is a reply to message #44807] Thu, 20 May 2004 21:05 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: jmurphy.mindreef.com

Hi everyone.

I'm trying to understand how to use XSD's SubstitutionGroups support. I
understand the XML/Schema construct at a practical level but I'm unclear
about the APIs:

1. ElementDecl.getSubstitutionGroupExclusions
2. ElementDecl.getSubstitutionGroup
3. ElementDecl.getSubstitutionGroupAffiliation

That I want to do is compile a list of substitutions given an abstract
element declaration. I expected to be able to call
elemDecl.getSubstitutionGroup and ave that return all of the
elementDecls that can substitute. But only the element itself is
included. An I out to lunch? Alsi what is an affiliation and an exculsion?

Thanks

Jim
Mindreef, Inc.
Re: SubstitutionGroups Help! [message #44906 is a reply to message #44889] Thu, 20 May 2004 23:04 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: merks.ca.ibm.com

Jim,

I'm not sure whether you have lunch in or out. ;-)

Each of these things have Javadoc that point at where the concept is defined in
the spec, so there's no point in repeating that information. I know the spec is
not much fun to read, but it's very precise. The basic idea is that
getSubstitutionGroupAffiliation is a concrete relation that set's up the
substitution group by saying "This element belongs to that element's group".
The getSubstitutionGroupExclusions defines limitations on what kinds of elements
can be in the element's group. And the getSubstitutionGroup returns all the
elements that are directly or indirectly in the group by virtue of the
affiliations.

Were you trying this out with any particular examples in mind?


Jim Murphy wrote:

> Hi everyone.
>
> I'm trying to understand how to use XSD's SubstitutionGroups support. I
> understand the XML/Schema construct at a practical level but I'm unclear
> about the APIs:
>
> 1. ElementDecl.getSubstitutionGroupExclusions
> 2. ElementDecl.getSubstitutionGroup
> 3. ElementDecl.getSubstitutionGroupAffiliation
>
> That I want to do is compile a list of substitutions given an abstract
> element declaration. I expected to be able to call
> elemDecl.getSubstitutionGroup and ave that return all of the
> elementDecls that can substitute. But only the element itself is
> included. An I out to lunch? Alsi what is an affiliation and an exculsion?
>
> Thanks
>
> Jim
> Mindreef, Inc.
Re: SubstitutionGroups Help! [message #45191 is a reply to message #44906] Fri, 21 May 2004 17:07 Go to previous message
Eclipse UserFriend
Originally posted by: user.domain.invalid

Lol - sorry bout that. Kind of lost it yesterday. :)

Thanks for the descriptions - you're spot on. I can *read* the spec but
that doesn't mean I can understand it. If I understand you right this
means the getSubstitutioGroup returns the set of elements that can
substitute for and element while the getSubsitutionGroupAffiliations is
a "back pointer" to the element where this element can substitute.

Actually it turns out the problem I was tracking down was the result of
a bad schema - but pretty understandable.

The author setup a pretty simple substitutionGroup based ona global
element declaration called: fred of type fredType. But, he went on to
attempt to use "fred" by creating a sequence of local elements named
"fred" of type "fredType". "Clearly" the 2 element decls are unrelated
but...


Jim Murphy
Mindreef, Inc.




Ed Merks wrote:

> Jim,
>
> I'm not sure whether you have lunch in or out. ;-)
>
> Each of these things have Javadoc that point at where the concept is defined in
> the spec, so there's no point in repeating that information. I know the spec is
> not much fun to read, but it's very precise. The basic idea is that
> getSubstitutionGroupAffiliation is a concrete relation that set's up the
> substitution group by saying "This element belongs to that element's group".
> The getSubstitutionGroupExclusions defines limitations on what kinds of elements
> can be in the element's group. And the getSubstitutionGroup returns all the
> elements that are directly or indirectly in the group by virtue of the
> affiliations.
>
> Were you trying this out with any particular examples in mind?
>
>
> Jim Murphy wrote:
>
>
>>Hi everyone.
>>
>>I'm trying to understand how to use XSD's SubstitutionGroups support. I
>>understand the XML/Schema construct at a practical level but I'm unclear
>>about the APIs:
>>
>>1. ElementDecl.getSubstitutionGroupExclusions
>>2. ElementDecl.getSubstitutionGroup
>>3. ElementDecl.getSubstitutionGroupAffiliation
>>
>>That I want to do is compile a list of substitutions given an abstract
>>element declaration. I expected to be able to call
>>elemDecl.getSubstitutionGroup and ave that return all of the
>>elementDecls that can substitute. But only the element itself is
>>included. An I out to lunch? Alsi what is an affiliation and an exculsion?
>>
>>Thanks
>>
>>Jim
>>Mindreef, Inc.
>
>
Re: XSDSchema serialization [message #587208 is a reply to message #44770] Tue, 18 May 2004 15:40 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33140
Registered: July 2009
Senior Member
Rodolfo,

Doing xsdSchema.eResource().save(System.out, null) should serialize your
instance.


Rodolfo Botto wrote:

> Is there a chance to serialize an XSDSchema ? I having performance trouble
> with XSDSchema instanciation from DOM, and in my case, can be avoided if I
> can serialize and XSDSchema.


Ed Merks
Professional Support: https://www.macromodeling.com/
SubstitutionGroups Help! [message #587261 is a reply to message #44807] Thu, 20 May 2004 21:05 Go to previous message
Eclipse UserFriend
Originally posted by: jmurphy.mindreef.com

Hi everyone.

I'm trying to understand how to use XSD's SubstitutionGroups support. I
understand the XML/Schema construct at a practical level but I'm unclear
about the APIs:

1. ElementDecl.getSubstitutionGroupExclusions
2. ElementDecl.getSubstitutionGroup
3. ElementDecl.getSubstitutionGroupAffiliation

That I want to do is compile a list of substitutions given an abstract
element declaration. I expected to be able to call
elemDecl.getSubstitutionGroup and ave that return all of the
elementDecls that can substitute. But only the element itself is
included. An I out to lunch? Alsi what is an affiliation and an exculsion?

Thanks

Jim
Mindreef, Inc.
Re: SubstitutionGroups Help! [message #587280 is a reply to message #44889] Thu, 20 May 2004 23:04 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33140
Registered: July 2009
Senior Member
Jim,

I'm not sure whether you have lunch in or out. ;-)

Each of these things have Javadoc that point at where the concept is defined in
the spec, so there's no point in repeating that information. I know the spec is
not much fun to read, but it's very precise. The basic idea is that
getSubstitutionGroupAffiliation is a concrete relation that set's up the
substitution group by saying "This element belongs to that element's group".
The getSubstitutionGroupExclusions defines limitations on what kinds of elements
can be in the element's group. And the getSubstitutionGroup returns all the
elements that are directly or indirectly in the group by virtue of the
affiliations.

Were you trying this out with any particular examples in mind?


Jim Murphy wrote:

> Hi everyone.
>
> I'm trying to understand how to use XSD's SubstitutionGroups support. I
> understand the XML/Schema construct at a practical level but I'm unclear
> about the APIs:
>
> 1. ElementDecl.getSubstitutionGroupExclusions
> 2. ElementDecl.getSubstitutionGroup
> 3. ElementDecl.getSubstitutionGroupAffiliation
>
> That I want to do is compile a list of substitutions given an abstract
> element declaration. I expected to be able to call
> elemDecl.getSubstitutionGroup and ave that return all of the
> elementDecls that can substitute. But only the element itself is
> included. An I out to lunch? Alsi what is an affiliation and an exculsion?
>
> Thanks
>
> Jim
> Mindreef, Inc.


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: SubstitutionGroups Help! [message #587359 is a reply to message #44906] Fri, 21 May 2004 17:07 Go to previous message
user is currently offline userFriend
Messages: 296
Registered: July 2009
Senior Member
Lol - sorry bout that. Kind of lost it yesterday. :)

Thanks for the descriptions - you're spot on. I can *read* the spec but
that doesn't mean I can understand it. If I understand you right this
means the getSubstitutioGroup returns the set of elements that can
substitute for and element while the getSubsitutionGroupAffiliations is
a "back pointer" to the element where this element can substitute.

Actually it turns out the problem I was tracking down was the result of
a bad schema - but pretty understandable.

The author setup a pretty simple substitutionGroup based ona global
element declaration called: fred of type fredType. But, he went on to
attempt to use "fred" by creating a sequence of local elements named
"fred" of type "fredType". "Clearly" the 2 element decls are unrelated
but...


Jim Murphy
Mindreef, Inc.




Ed Merks wrote:

> Jim,
>
> I'm not sure whether you have lunch in or out. ;-)
>
> Each of these things have Javadoc that point at where the concept is defined in
> the spec, so there's no point in repeating that information. I know the spec is
> not much fun to read, but it's very precise. The basic idea is that
> getSubstitutionGroupAffiliation is a concrete relation that set's up the
> substitution group by saying "This element belongs to that element's group".
> The getSubstitutionGroupExclusions defines limitations on what kinds of elements
> can be in the element's group. And the getSubstitutionGroup returns all the
> elements that are directly or indirectly in the group by virtue of the
> affiliations.
>
> Were you trying this out with any particular examples in mind?
>
>
> Jim Murphy wrote:
>
>
>>Hi everyone.
>>
>>I'm trying to understand how to use XSD's SubstitutionGroups support. I
>>understand the XML/Schema construct at a practical level but I'm unclear
>>about the APIs:
>>
>>1. ElementDecl.getSubstitutionGroupExclusions
>>2. ElementDecl.getSubstitutionGroup
>>3. ElementDecl.getSubstitutionGroupAffiliation
>>
>>That I want to do is compile a list of substitutions given an abstract
>>element declaration. I expected to be able to call
>>elemDecl.getSubstitutionGroup and ave that return all of the
>>elementDecls that can substitute. But only the element itself is
>>included. An I out to lunch? Alsi what is an affiliation and an exculsion?
>>
>>Thanks
>>
>>Jim
>>Mindreef, Inc.
>
>
Previous Topic:A question about walkers/visitors
Next Topic:Retrieving user information
Goto Forum:
  


Current Time: Thu Apr 25 13:18:32 GMT 2024

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

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

Back to the top