Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » XML Schema Definition (XSD) » Help with annotations
Help with annotations [message #38174] Mon, 08 March 2004 14:08 Go to next message
Lance Phillips is currently offline Lance PhillipsFriend
Messages: 210
Registered: July 2009
Senior Member
Ed,
I need some help with annotations. We have several extension properties
for XSDSimpleTypeDefinitions that we'd like to persist via Annotations.
What is the best practice for capturing name value pairs in the appInfo?
The tricky part is that the values may contain all readable characters so we
can't simply use a delimited string. We'd prefer to use XML, but if I
remember correctly there are issues with capturing XML in the appInfo value
field.

thanks,

Lance Phillips
Re: Help with annotations [message #38272 is a reply to message #38174] Mon, 08 March 2004 16:02 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: merks.ca.ibm.com

Lance,

The appinfo element can contain any nested XML so you should have a source
attribute to uniquely identify the appinfo as yours and then have some XML
syntax for describing the information, kind of like <hfp:xyz> stuff in the
schema for schemas. You might also consider encoding the information as a
non-schema namespace attribute, kind of like the ecore:xyz annotations we
support for specifying the mapping to Ecore.


Lance Phillips wrote:

> Ed,
> I need some help with annotations. We have several extension properties
> for XSDSimpleTypeDefinitions that we'd like to persist via Annotations.
> What is the best practice for capturing name value pairs in the appInfo?
> The tricky part is that the values may contain all readable characters so we
> can't simply use a delimited string. We'd prefer to use XML, but if I
> remember correctly there are issues with capturing XML in the appInfo value
> field.
>
> thanks,
>
> Lance Phillips
Re: Help with annotations [message #38371 is a reply to message #38272] Mon, 08 March 2004 18:33 Go to previous messageGo to next message
Lance Phillips is currently offline Lance PhillipsFriend
Messages: 210
Registered: July 2009
Senior Member
Ed,
I actually found a very simple approach that seems to meet our needs.
Under the appinfo element I've simply added our tags as dom Attr entities.
It outputs beautifully and seems to meet all our needs. Are there any
dangers that I should be aware of with this approach?

thanks,

lp
"Ed Merks" <merks@ca.ibm.com> wrote in message
news:404C990C.A8F2B6F1@ca.ibm.com...
> Lance,
>
> The appinfo element can contain any nested XML so you should have a source
> attribute to uniquely identify the appinfo as yours and then have some XML
> syntax for describing the information, kind of like <hfp:xyz> stuff in the
> schema for schemas. You might also consider encoding the information as a
> non-schema namespace attribute, kind of like the ecore:xyz annotations we
> support for specifying the mapping to Ecore.
>
>
> Lance Phillips wrote:
>
> > Ed,
> > I need some help with annotations. We have several extension
properties
> > for XSDSimpleTypeDefinitions that we'd like to persist via Annotations.
> > What is the best practice for capturing name value pairs in the appInfo?
> > The tricky part is that the values may contain all readable characters
so we
> > can't simply use a delimited string. We'd prefer to use XML, but if I
> > remember correctly there are issues with capturing XML in the appInfo
value
> > field.
> >
> > thanks,
> >
> > Lance Phillips
>
Re: Help with annotations [message #38404 is a reply to message #38371] Mon, 08 March 2004 22:53 Go to previous message
Eclipse UserFriend
Originally posted by: merks.ca.ibm.com

Lance,

This sounds fine.


Lance Phillips wrote:

> Ed,
> I actually found a very simple approach that seems to meet our needs.
> Under the appinfo element I've simply added our tags as dom Attr entities.
> It outputs beautifully and seems to meet all our needs. Are there any
> dangers that I should be aware of with this approach?
>
> thanks,
>
> lp
> "Ed Merks" <merks@ca.ibm.com> wrote in message
> news:404C990C.A8F2B6F1@ca.ibm.com...
> > Lance,
> >
> > The appinfo element can contain any nested XML so you should have a source
> > attribute to uniquely identify the appinfo as yours and then have some XML
> > syntax for describing the information, kind of like <hfp:xyz> stuff in the
> > schema for schemas. You might also consider encoding the information as a
> > non-schema namespace attribute, kind of like the ecore:xyz annotations we
> > support for specifying the mapping to Ecore.
> >
> >
> > Lance Phillips wrote:
> >
> > > Ed,
> > > I need some help with annotations. We have several extension
> properties
> > > for XSDSimpleTypeDefinitions that we'd like to persist via Annotations.
> > > What is the best practice for capturing name value pairs in the appInfo?
> > > The tricky part is that the values may contain all readable characters
> so we
> > > can't simply use a delimited string. We'd prefer to use XML, but if I
> > > remember correctly there are issues with capturing XML in the appInfo
> value
> > > field.
> > >
> > > thanks,
> > >
> > > Lance Phillips
> >
Re: Help with annotations [message #583932 is a reply to message #38174] Mon, 08 March 2004 16:02 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 31536
Registered: July 2009
Senior Member
Lance,

The appinfo element can contain any nested XML so you should have a source
attribute to uniquely identify the appinfo as yours and then have some XML
syntax for describing the information, kind of like <hfp:xyz> stuff in the
schema for schemas. You might also consider encoding the information as a
non-schema namespace attribute, kind of like the ecore:xyz annotations we
support for specifying the mapping to Ecore.


Lance Phillips wrote:

> Ed,
> I need some help with annotations. We have several extension properties
> for XSDSimpleTypeDefinitions that we'd like to persist via Annotations.
> What is the best practice for capturing name value pairs in the appInfo?
> The tricky part is that the values may contain all readable characters so we
> can't simply use a delimited string. We'd prefer to use XML, but if I
> remember correctly there are issues with capturing XML in the appInfo value
> field.
>
> thanks,
>
> Lance Phillips


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Help with annotations [message #583990 is a reply to message #38272] Mon, 08 March 2004 18:33 Go to previous message
Lance Phillips is currently offline Lance PhillipsFriend
Messages: 210
Registered: July 2009
Senior Member
Ed,
I actually found a very simple approach that seems to meet our needs.
Under the appinfo element I've simply added our tags as dom Attr entities.
It outputs beautifully and seems to meet all our needs. Are there any
dangers that I should be aware of with this approach?

thanks,

lp
"Ed Merks" <merks@ca.ibm.com> wrote in message
news:404C990C.A8F2B6F1@ca.ibm.com...
> Lance,
>
> The appinfo element can contain any nested XML so you should have a source
> attribute to uniquely identify the appinfo as yours and then have some XML
> syntax for describing the information, kind of like <hfp:xyz> stuff in the
> schema for schemas. You might also consider encoding the information as a
> non-schema namespace attribute, kind of like the ecore:xyz annotations we
> support for specifying the mapping to Ecore.
>
>
> Lance Phillips wrote:
>
> > Ed,
> > I need some help with annotations. We have several extension
properties
> > for XSDSimpleTypeDefinitions that we'd like to persist via Annotations.
> > What is the best practice for capturing name value pairs in the appInfo?
> > The tricky part is that the values may contain all readable characters
so we
> > can't simply use a delimited string. We'd prefer to use XML, but if I
> > remember correctly there are issues with capturing XML in the appInfo
value
> > field.
> >
> > thanks,
> >
> > Lance Phillips
>
Re: Help with annotations [message #584003 is a reply to message #38371] Mon, 08 March 2004 22:53 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 31536
Registered: July 2009
Senior Member
Lance,

This sounds fine.


Lance Phillips wrote:

> Ed,
> I actually found a very simple approach that seems to meet our needs.
> Under the appinfo element I've simply added our tags as dom Attr entities.
> It outputs beautifully and seems to meet all our needs. Are there any
> dangers that I should be aware of with this approach?
>
> thanks,
>
> lp
> "Ed Merks" <merks@ca.ibm.com> wrote in message
> news:404C990C.A8F2B6F1@ca.ibm.com...
> > Lance,
> >
> > The appinfo element can contain any nested XML so you should have a source
> > attribute to uniquely identify the appinfo as yours and then have some XML
> > syntax for describing the information, kind of like <hfp:xyz> stuff in the
> > schema for schemas. You might also consider encoding the information as a
> > non-schema namespace attribute, kind of like the ecore:xyz annotations we
> > support for specifying the mapping to Ecore.
> >
> >
> > Lance Phillips wrote:
> >
> > > Ed,
> > > I need some help with annotations. We have several extension
> properties
> > > for XSDSimpleTypeDefinitions that we'd like to persist via Annotations.
> > > What is the best practice for capturing name value pairs in the appInfo?
> > > The tricky part is that the values may contain all readable characters
> so we
> > > can't simply use a delimited string. We'd prefer to use XML, but if I
> > > remember correctly there are issues with capturing XML in the appInfo
> value
> > > field.
> > >
> > > thanks,
> > >
> > > Lance Phillips
> >


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:Help with annotations
Next Topic:Problem Including schemas
Goto Forum:
  


Current Time: Tue Oct 20 02:03:32 GMT 2020

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

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

Back to the top