Home » Archived » XML Schema Definition (XSD) » Annotation appinfo troubles
|
Re: Annotation appinfo troubles [message #42416 is a reply to message #42357] |
Wed, 28 April 2004 11:45 |
Eclipse User |
|
|
|
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 |
foo bar 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 |
Eclipse User |
|
|
|
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 |
foo bar 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 |
Ed Merks Messages: 33264 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 |
foo bar 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 |
Ed Merks Messages: 33264 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 |
foo bar 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
>
|
|
|
Goto Forum:
Current Time: Fri Dec 27 03:30:44 GMT 2024
Powered by FUDForum. Page generated in 0.05125 seconds
|