Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » XML Schema Definition (XSD) » Annotation appinfo troubles
Annotation appinfo troubles [message #42357] Wed, 28 April 2004 02:47 Go to next message
foo bar is currently offline foo barFriend
Messages: 55
Registered: July 2009
Member
Hi,

I am trying to add appinfo to an annotation for an xsd:enumeration (used on
an integer based restricted simple type - let's call it "foo").

If I use createApplicationInformation to create the appinfo on the
enumeration, an element declaration based on the type containing the
enumeration is printed without the type reference:
<xsd:complexType name="tComplex">

<xsd:sequence>

<xsd:element name="baz" type="xsd:string"/>

<xsd:element name="bar"/>

<xsd:element name="ttt"/>

The annotation, appinfo and my custom appinfo child elements are printed
fine together with the simple type containing the enumeration.

If I comment out the code that creates the appinfo, the element declaration
is printed with the proper type:


<xsd:complexType name="tComplex">

<xsd:sequence>

<xsd:element name="baz" type="xsd:string"/>

<xsd:element name="bar" type="tns:foo"/>

<xsd:element name="ttt" type="xsd:string"/>

I've tried commenting out the code that adds my own custom "any" content
under appinfo. The result is the same.

What is strange is that even elements based on xsd types (for example
xsd:string) are printed without their type as soon as one call to
createApplicationInformation is being made..

Unfortunately, I can't attach the entire code due to dependencies on other
libraries.

I am running version 1.1.0. Any suggestions are appreciated.

Regards,

Valentin
Re: Annotation appinfo troubles [message #42416 is a reply to message #42357] Wed, 28 April 2004 11:45 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: merks.ca.ibm.com

Valentin,

You'll need to show at least some code to get useful help. (Or better yet, a
small example that reproduces the problem.) Calling
createApplicationInformation will do two things; it will ensure that an
underlying DOM exists by calling updateElement, if neccesarry, and then it will
create the node. So unless calling updateElement is causing a problem,
creating the appinfo should have no impact beyond what you do with it after.
Note that the XSDPrototypicalSchema example creates appinfo and it works
okay...


Valentin Baciu wrote:

> Hi,
>
> I am trying to add appinfo to an annotation for an xsd:enumeration (used on
> an integer based restricted simple type - let's call it "foo").
>
> If I use createApplicationInformation to create the appinfo on the
> enumeration, an element declaration based on the type containing the
> enumeration is printed without the type reference:
> <xsd:complexType name="tComplex">
>
> <xsd:sequence>
>
> <xsd:element name="baz" type="xsd:string"/>
>
> <xsd:element name="bar"/>
>
> <xsd:element name="ttt"/>
>
> The annotation, appinfo and my custom appinfo child elements are printed
> fine together with the simple type containing the enumeration.
>
> If I comment out the code that creates the appinfo, the element declaration
> is printed with the proper type:
>
> <xsd:complexType name="tComplex">
>
> <xsd:sequence>
>
> <xsd:element name="baz" type="xsd:string"/>
>
> <xsd:element name="bar" type="tns:foo"/>
>
> <xsd:element name="ttt" type="xsd:string"/>
>
> I've tried commenting out the code that adds my own custom "any" content
> under appinfo. The result is the same.
>
> What is strange is that even elements based on xsd types (for example
> xsd:string) are printed without their type as soon as one call to
> createApplicationInformation is being made..
>
> Unfortunately, I can't attach the entire code due to dependencies on other
> libraries.
>
> I am running version 1.1.0. Any suggestions are appreciated.
>
> Regards,
>
> Valentin
Re: Annotation appinfo troubles [message #42469 is a reply to message #42416] Wed, 28 April 2004 15:55 Go to previous messageGo to next message
foo bar is currently offline foo barFriend
Messages: 55
Registered: July 2009
Member
Thanks for the reply Ed,

I've created a sample class that illustrates the problem. I'm attaching it.
If you have some time to try it, please make sure you run it under 1.1.0.

Valentin


"Ed Merks" <merks@ca.ibm.com> wrote in message
news:408F994D.29B90297@ca.ibm.com...
> Valentin,
>
> You'll need to show at least some code to get useful help. (Or better yet,
a
> small example that reproduces the problem.) Calling
> createApplicationInformation will do two things; it will ensure that an
> underlying DOM exists by calling updateElement, if neccesarry, and then it
will
> create the node. So unless calling updateElement is causing a problem,
> creating the appinfo should have no impact beyond what you do with it
after.
> Note that the XSDPrototypicalSchema example creates appinfo and it works
> okay...
>
>
> Valentin Baciu wrote:
>
> > Hi,
> >
> > I am trying to add appinfo to an annotation for an xsd:enumeration (used
on
> > an integer based restricted simple type - let's call it "foo").
> >
> > If I use createApplicationInformation to create the appinfo on the
> > enumeration, an element declaration based on the type containing the
> > enumeration is printed without the type reference:
> > <xsd:complexType name="tComplex">
> >
> > <xsd:sequence>
> >
> > <xsd:element name="baz" type="xsd:string"/>
> >
> > <xsd:element name="bar"/>
> >
> > <xsd:element name="ttt"/>
> >
> > The annotation, appinfo and my custom appinfo child elements are printed
> > fine together with the simple type containing the enumeration.
> >
> > If I comment out the code that creates the appinfo, the element
declaration
> > is printed with the proper type:
> >
> > <xsd:complexType name="tComplex">
> >
> > <xsd:sequence>
> >
> > <xsd:element name="baz" type="xsd:string"/>
> >
> > <xsd:element name="bar" type="tns:foo"/>
> >
> > <xsd:element name="ttt" type="xsd:string"/>
> >
> > I've tried commenting out the code that adds my own custom "any" content
> > under appinfo. The result is the same.
> >
> > What is strange is that even elements based on xsd types (for example
> > xsd:string) are printed without their type as soon as one call to
> > createApplicationInformation is being made..
> >
> > Unfortunately, I can't attach the entire code due to dependencies on
other
> > libraries.
> >
> > I am running version 1.1.0. Any suggestions are appreciated.
> >
> > Regards,
> >
> > Valentin
>


Re: Annotation appinfo troubles [message #42664 is a reply to message #42469] Wed, 28 April 2004 20:23 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: merks.ca.ibm.com

Valentin,

Thanks for the sample, I really appreciate that! Please open a bugzilla defect
with this sample code. As a workaround, call schema.updateElement at the end and
it should fix things up.


Valentin Baciu wrote:

> Thanks for the reply Ed,
>
> I've created a sample class that illustrates the problem. I'm attaching it.
> If you have some time to try it, please make sure you run it under 1.1.0.
>
> Valentin
>
> "Ed Merks" <merks@ca.ibm.com> wrote in message
> news:408F994D.29B90297@ca.ibm.com...
> > Valentin,
> >
> > You'll need to show at least some code to get useful help. (Or better yet,
> a
> > small example that reproduces the problem.) Calling
> > createApplicationInformation will do two things; it will ensure that an
> > underlying DOM exists by calling updateElement, if neccesarry, and then it
> will
> > create the node. So unless calling updateElement is causing a problem,
> > creating the appinfo should have no impact beyond what you do with it
> after.
> > Note that the XSDPrototypicalSchema example creates appinfo and it works
> > okay...
> >
> >
> > Valentin Baciu wrote:
> >
> > > Hi,
> > >
> > > I am trying to add appinfo to an annotation for an xsd:enumeration (used
> on
> > > an integer based restricted simple type - let's call it "foo").
> > >
> > > If I use createApplicationInformation to create the appinfo on the
> > > enumeration, an element declaration based on the type containing the
> > > enumeration is printed without the type reference:
> > > <xsd:complexType name="tComplex">
> > >
> > > <xsd:sequence>
> > >
> > > <xsd:element name="baz" type="xsd:string"/>
> > >
> > > <xsd:element name="bar"/>
> > >
> > > <xsd:element name="ttt"/>
> > >
> > > The annotation, appinfo and my custom appinfo child elements are printed
> > > fine together with the simple type containing the enumeration.
> > >
> > > If I comment out the code that creates the appinfo, the element
> declaration
> > > is printed with the proper type:
> > >
> > > <xsd:complexType name="tComplex">
> > >
> > > <xsd:sequence>
> > >
> > > <xsd:element name="baz" type="xsd:string"/>
> > >
> > > <xsd:element name="bar" type="tns:foo"/>
> > >
> > > <xsd:element name="ttt" type="xsd:string"/>
> > >
> > > I've tried commenting out the code that adds my own custom "any" content
> > > under appinfo. The result is the same.
> > >
> > > What is strange is that even elements based on xsd types (for example
> > > xsd:string) are printed without their type as soon as one call to
> > > createApplicationInformation is being made..
> > >
> > > Unfortunately, I can't attach the entire code due to dependencies on
> other
> > > libraries.
> > >
> > > I am running version 1.1.0. Any suggestions are appreciated.
> > >
> > > Regards,
> > >
> > > Valentin
> >
>
> Name: AnnotationSample.java
> AnnotationSample.java Type: unspecified type (application/octet-stream)
> Encoding: x-uuencode
Re: Annotation appinfo troubles [message #42819 is a reply to message #42664] Thu, 29 April 2004 15:16 Go to previous message
foo bar is currently offline foo barFriend
Messages: 55
Registered: July 2009
Member
Done, https://bugs.eclipse.org/bugs/show_bug.cgi?id=60438
The workaround worked ;-)

"Ed Merks" <merks@ca.ibm.com> wrote in message
news:409012C6.D483F563@ca.ibm.com...
> Valentin,
>
> Thanks for the sample, I really appreciate that! Please open a bugzilla
defect
> with this sample code. As a workaround, call schema.updateElement at the
end and
> it should fix things up.
>
>
> Valentin Baciu wrote:
>
> > Thanks for the reply Ed,
> >
> > I've created a sample class that illustrates the problem. I'm attaching
it.
> > If you have some time to try it, please make sure you run it under
1.1.0.
> >
> > Valentin
> >
> > "Ed Merks" <merks@ca.ibm.com> wrote in message
> > news:408F994D.29B90297@ca.ibm.com...
> > > Valentin,
> > >
> > > You'll need to show at least some code to get useful help. (Or better
yet,
> > a
> > > small example that reproduces the problem.) Calling
> > > createApplicationInformation will do two things; it will ensure that
an
> > > underlying DOM exists by calling updateElement, if neccesarry, and
then it
> > will
> > > create the node. So unless calling updateElement is causing a
problem,
> > > creating the appinfo should have no impact beyond what you do with it
> > after.
> > > Note that the XSDPrototypicalSchema example creates appinfo and it
works
> > > okay...
> > >
> > >
> > > Valentin Baciu wrote:
> > >
> > > > Hi,
> > > >
> > > > I am trying to add appinfo to an annotation for an xsd:enumeration
(used
> > on
> > > > an integer based restricted simple type - let's call it "foo").
> > > >
> > > > If I use createApplicationInformation to create the appinfo on the
> > > > enumeration, an element declaration based on the type containing the
> > > > enumeration is printed without the type reference:
> > > > <xsd:complexType name="tComplex">
> > > >
> > > > <xsd:sequence>
> > > >
> > > > <xsd:element name="baz" type="xsd:string"/>
> > > >
> > > > <xsd:element name="bar"/>
> > > >
> > > > <xsd:element name="ttt"/>
> > > >
> > > > The annotation, appinfo and my custom appinfo child elements are
printed
> > > > fine together with the simple type containing the enumeration.
> > > >
> > > > If I comment out the code that creates the appinfo, the element
> > declaration
> > > > is printed with the proper type:
> > > >
> > > > <xsd:complexType name="tComplex">
> > > >
> > > > <xsd:sequence>
> > > >
> > > > <xsd:element name="baz" type="xsd:string"/>
> > > >
> > > > <xsd:element name="bar" type="tns:foo"/>
> > > >
> > > > <xsd:element name="ttt" type="xsd:string"/>
> > > >
> > > > I've tried commenting out the code that adds my own custom "any"
content
> > > > under appinfo. The result is the same.
> > > >
> > > > What is strange is that even elements based on xsd types (for
example
> > > > xsd:string) are printed without their type as soon as one call to
> > > > createApplicationInformation is being made..
> > > >
> > > > Unfortunately, I can't attach the entire code due to dependencies on
> > other
> > > > libraries.
> > > >
> > > > I am running version 1.1.0. Any suggestions are appreciated.
> > > >
> > > > Regards,
> > > >
> > > > Valentin
> > >
> >
> > Name: AnnotationSample.java
> > AnnotationSample.java Type: unspecified type
(application/octet-stream)
> > Encoding: x-uuencode
>
Re: Annotation appinfo troubles [message #586131 is a reply to message #42357] Wed, 28 April 2004 11:45 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33113
Registered: July 2009
Senior Member
Valentin,

You'll need to show at least some code to get useful help. (Or better yet, a
small example that reproduces the problem.) Calling
createApplicationInformation will do two things; it will ensure that an
underlying DOM exists by calling updateElement, if neccesarry, and then it will
create the node. So unless calling updateElement is causing a problem,
creating the appinfo should have no impact beyond what you do with it after.
Note that the XSDPrototypicalSchema example creates appinfo and it works
okay...


Valentin Baciu wrote:

> Hi,
>
> I am trying to add appinfo to an annotation for an xsd:enumeration (used on
> an integer based restricted simple type - let's call it "foo").
>
> If I use createApplicationInformation to create the appinfo on the
> enumeration, an element declaration based on the type containing the
> enumeration is printed without the type reference:
> <xsd:complexType name="tComplex">
>
> <xsd:sequence>
>
> <xsd:element name="baz" type="xsd:string"/>
>
> <xsd:element name="bar"/>
>
> <xsd:element name="ttt"/>
>
> The annotation, appinfo and my custom appinfo child elements are printed
> fine together with the simple type containing the enumeration.
>
> If I comment out the code that creates the appinfo, the element declaration
> is printed with the proper type:
>
> <xsd:complexType name="tComplex">
>
> <xsd:sequence>
>
> <xsd:element name="baz" type="xsd:string"/>
>
> <xsd:element name="bar" type="tns:foo"/>
>
> <xsd:element name="ttt" type="xsd:string"/>
>
> I've tried commenting out the code that adds my own custom "any" content
> under appinfo. The result is the same.
>
> What is strange is that even elements based on xsd types (for example
> xsd:string) are printed without their type as soon as one call to
> createApplicationInformation is being made..
>
> Unfortunately, I can't attach the entire code due to dependencies on other
> libraries.
>
> I am running version 1.1.0. Any suggestions are appreciated.
>
> Regards,
>
> Valentin


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Annotation appinfo troubles [message #586155 is a reply to message #42416] Wed, 28 April 2004 15:55 Go to previous message
foo bar is currently offline foo barFriend
Messages: 55
Registered: July 2009
Member
Thanks for the reply Ed,

I've created a sample class that illustrates the problem. I'm attaching it.
If you have some time to try it, please make sure you run it under 1.1.0.

Valentin


"Ed Merks" <merks@ca.ibm.com> wrote in message
news:408F994D.29B90297@ca.ibm.com...
> Valentin,
>
> You'll need to show at least some code to get useful help. (Or better yet,
a
> small example that reproduces the problem.) Calling
> createApplicationInformation will do two things; it will ensure that an
> underlying DOM exists by calling updateElement, if neccesarry, and then it
will
> create the node. So unless calling updateElement is causing a problem,
> creating the appinfo should have no impact beyond what you do with it
after.
> Note that the XSDPrototypicalSchema example creates appinfo and it works
> okay...
>
>
> Valentin Baciu wrote:
>
> > Hi,
> >
> > I am trying to add appinfo to an annotation for an xsd:enumeration (used
on
> > an integer based restricted simple type - let's call it "foo").
> >
> > If I use createApplicationInformation to create the appinfo on the
> > enumeration, an element declaration based on the type containing the
> > enumeration is printed without the type reference:
> > <xsd:complexType name="tComplex">
> >
> > <xsd:sequence>
> >
> > <xsd:element name="baz" type="xsd:string"/>
> >
> > <xsd:element name="bar"/>
> >
> > <xsd:element name="ttt"/>
> >
> > The annotation, appinfo and my custom appinfo child elements are printed
> > fine together with the simple type containing the enumeration.
> >
> > If I comment out the code that creates the appinfo, the element
declaration
> > is printed with the proper type:
> >
> > <xsd:complexType name="tComplex">
> >
> > <xsd:sequence>
> >
> > <xsd:element name="baz" type="xsd:string"/>
> >
> > <xsd:element name="bar" type="tns:foo"/>
> >
> > <xsd:element name="ttt" type="xsd:string"/>
> >
> > I've tried commenting out the code that adds my own custom "any" content
> > under appinfo. The result is the same.
> >
> > What is strange is that even elements based on xsd types (for example
> > xsd:string) are printed without their type as soon as one call to
> > createApplicationInformation is being made..
> >
> > Unfortunately, I can't attach the entire code due to dependencies on
other
> > libraries.
> >
> > I am running version 1.1.0. Any suggestions are appreciated.
> >
> > Regards,
> >
> > Valentin
>


Re: Annotation appinfo troubles [message #586254 is a reply to message #42469] Wed, 28 April 2004 20:23 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33113
Registered: July 2009
Senior Member
Valentin,

Thanks for the sample, I really appreciate that! Please open a bugzilla defect
with this sample code. As a workaround, call schema.updateElement at the end and
it should fix things up.


Valentin Baciu wrote:

> Thanks for the reply Ed,
>
> I've created a sample class that illustrates the problem. I'm attaching it.
> If you have some time to try it, please make sure you run it under 1.1.0.
>
> Valentin
>
> "Ed Merks" <merks@ca.ibm.com> wrote in message
> news:408F994D.29B90297@ca.ibm.com...
> > Valentin,
> >
> > You'll need to show at least some code to get useful help. (Or better yet,
> a
> > small example that reproduces the problem.) Calling
> > createApplicationInformation will do two things; it will ensure that an
> > underlying DOM exists by calling updateElement, if neccesarry, and then it
> will
> > create the node. So unless calling updateElement is causing a problem,
> > creating the appinfo should have no impact beyond what you do with it
> after.
> > Note that the XSDPrototypicalSchema example creates appinfo and it works
> > okay...
> >
> >
> > Valentin Baciu wrote:
> >
> > > Hi,
> > >
> > > I am trying to add appinfo to an annotation for an xsd:enumeration (used
> on
> > > an integer based restricted simple type - let's call it "foo").
> > >
> > > If I use createApplicationInformation to create the appinfo on the
> > > enumeration, an element declaration based on the type containing the
> > > enumeration is printed without the type reference:
> > > <xsd:complexType name="tComplex">
> > >
> > > <xsd:sequence>
> > >
> > > <xsd:element name="baz" type="xsd:string"/>
> > >
> > > <xsd:element name="bar"/>
> > >
> > > <xsd:element name="ttt"/>
> > >
> > > The annotation, appinfo and my custom appinfo child elements are printed
> > > fine together with the simple type containing the enumeration.
> > >
> > > If I comment out the code that creates the appinfo, the element
> declaration
> > > is printed with the proper type:
> > >
> > > <xsd:complexType name="tComplex">
> > >
> > > <xsd:sequence>
> > >
> > > <xsd:element name="baz" type="xsd:string"/>
> > >
> > > <xsd:element name="bar" type="tns:foo"/>
> > >
> > > <xsd:element name="ttt" type="xsd:string"/>
> > >
> > > I've tried commenting out the code that adds my own custom "any" content
> > > under appinfo. The result is the same.
> > >
> > > What is strange is that even elements based on xsd types (for example
> > > xsd:string) are printed without their type as soon as one call to
> > > createApplicationInformation is being made..
> > >
> > > Unfortunately, I can't attach the entire code due to dependencies on
> other
> > > libraries.
> > >
> > > I am running version 1.1.0. Any suggestions are appreciated.
> > >
> > > Regards,
> > >
> > > Valentin
> >
>
> Name: AnnotationSample.java
> AnnotationSample.java Type: unspecified type (application/octet-stream)
> Encoding: x-uuencode


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Annotation appinfo troubles [message #586340 is a reply to message #42664] Thu, 29 April 2004 15:16 Go to previous message
foo bar is currently offline foo barFriend
Messages: 55
Registered: July 2009
Member
Done, https://bugs.eclipse.org/bugs/show_bug.cgi?id=60438
The workaround worked ;-)

"Ed Merks" <merks@ca.ibm.com> wrote in message
news:409012C6.D483F563@ca.ibm.com...
> Valentin,
>
> Thanks for the sample, I really appreciate that! Please open a bugzilla
defect
> with this sample code. As a workaround, call schema.updateElement at the
end and
> it should fix things up.
>
>
> Valentin Baciu wrote:
>
> > Thanks for the reply Ed,
> >
> > I've created a sample class that illustrates the problem. I'm attaching
it.
> > If you have some time to try it, please make sure you run it under
1.1.0.
> >
> > Valentin
> >
> > "Ed Merks" <merks@ca.ibm.com> wrote in message
> > news:408F994D.29B90297@ca.ibm.com...
> > > Valentin,
> > >
> > > You'll need to show at least some code to get useful help. (Or better
yet,
> > a
> > > small example that reproduces the problem.) Calling
> > > createApplicationInformation will do two things; it will ensure that
an
> > > underlying DOM exists by calling updateElement, if neccesarry, and
then it
> > will
> > > create the node. So unless calling updateElement is causing a
problem,
> > > creating the appinfo should have no impact beyond what you do with it
> > after.
> > > Note that the XSDPrototypicalSchema example creates appinfo and it
works
> > > okay...
> > >
> > >
> > > Valentin Baciu wrote:
> > >
> > > > Hi,
> > > >
> > > > I am trying to add appinfo to an annotation for an xsd:enumeration
(used
> > on
> > > > an integer based restricted simple type - let's call it "foo").
> > > >
> > > > If I use createApplicationInformation to create the appinfo on the
> > > > enumeration, an element declaration based on the type containing the
> > > > enumeration is printed without the type reference:
> > > > <xsd:complexType name="tComplex">
> > > >
> > > > <xsd:sequence>
> > > >
> > > > <xsd:element name="baz" type="xsd:string"/>
> > > >
> > > > <xsd:element name="bar"/>
> > > >
> > > > <xsd:element name="ttt"/>
> > > >
> > > > The annotation, appinfo and my custom appinfo child elements are
printed
> > > > fine together with the simple type containing the enumeration.
> > > >
> > > > If I comment out the code that creates the appinfo, the element
> > declaration
> > > > is printed with the proper type:
> > > >
> > > > <xsd:complexType name="tComplex">
> > > >
> > > > <xsd:sequence>
> > > >
> > > > <xsd:element name="baz" type="xsd:string"/>
> > > >
> > > > <xsd:element name="bar" type="tns:foo"/>
> > > >
> > > > <xsd:element name="ttt" type="xsd:string"/>
> > > >
> > > > I've tried commenting out the code that adds my own custom "any"
content
> > > > under appinfo. The result is the same.
> > > >
> > > > What is strange is that even elements based on xsd types (for
example
> > > > xsd:string) are printed without their type as soon as one call to
> > > > createApplicationInformation is being made..
> > > >
> > > > Unfortunately, I can't attach the entire code due to dependencies on
> > other
> > > > libraries.
> > > >
> > > > I am running version 1.1.0. Any suggestions are appreciated.
> > > >
> > > > Regards,
> > > >
> > > > Valentin
> > >
> >
> > Name: AnnotationSample.java
> > AnnotationSample.java Type: unspecified type
(application/octet-stream)
> > Encoding: x-uuencode
>
Previous Topic:Schema locations
Next Topic:Schema diagnostics
Goto Forum:
  


Current Time: Thu Mar 28 21:04:34 GMT 2024

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

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

Back to the top