Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » XML Schema Definition (XSD) » Search for Element Declaration
Search for Element Declaration [message #35963] Thu, 15 January 2004 16:58 Go to next message
Eclipse User
Originally posted by: vikas.lamba.qwest.com

Hi there

How can I find an element(I have the namespace URI and the element name)
among the global element declarations? I know I can get all the global
element declarations and iterate through them, but isn't there a short-cut
search method that would allow me to do the same?

Thanks
Vikas
Re: Search for Element Declaration [message #35997 is a reply to message #35963] Thu, 15 January 2004 17:46 Go to previous messageGo to next message
David Steinberg is currently offline David Steinberg
Messages: 489
Registered: July 2009
Senior Member
Vikas Lamba wrote:

> How can I find an element(I have the namespace URI and the element name)
> among the global element declarations? I know I can get all the global
> element declarations and iterate through them, but isn't there a short-cut
> search method that would allow me to do the same?

Hi Vikas,

I think XSDConcreteComponent.resolveElementDeclaration() does what you're
looking for. You can call it on any schema object and it will return the
named global element in the schema. If no such element is found, it will
create a new one, initialize the name, and return that.

Cheers,
Dave
Re: Search for Element Declaration [message #36033 is a reply to message #35997] Thu, 15 January 2004 17:48 Go to previous message
Eclipse User
Originally posted by: vikas.lamba.qwest.com

Thanks Dave. I figured it out moments after sending the mail.

Dave Steinberg wrote:

> Hi Vikas,

> I think XSDConcreteComponent.resolveElementDeclaration() does what you're
> looking for. You can call it on any schema object and it will return the
> named global element in the schema. If no such element is found, it will
> create a new one, initialize the name, and return that.

> Cheers,
> Dave
Re: Search for Element Declaration [message #582794 is a reply to message #35963] Thu, 15 January 2004 17:46 Go to previous message
David Steinberg is currently offline David Steinberg
Messages: 489
Registered: July 2009
Senior Member
Vikas Lamba wrote:

> How can I find an element(I have the namespace URI and the element name)
> among the global element declarations? I know I can get all the global
> element declarations and iterate through them, but isn't there a short-cut
> search method that would allow me to do the same?

Hi Vikas,

I think XSDConcreteComponent.resolveElementDeclaration() does what you're
looking for. You can call it on any schema object and it will return the
named global element in the schema. If no such element is found, it will
create a new one, initialize the name, and return that.

Cheers,
Dave
Re: Search for Element Declaration [message #582816 is a reply to message #35997] Thu, 15 January 2004 17:48 Go to previous message
Eclipse User
Originally posted by: vikas.lamba.qwest.com

Thanks Dave. I figured it out moments after sending the mail.

Dave Steinberg wrote:

> Hi Vikas,

> I think XSDConcreteComponent.resolveElementDeclaration() does what you're
> looking for. You can call it on any schema object and it will return the
> named global element in the schema. If no such element is found, it will
> create a new one, initialize the name, and return that.

> Cheers,
> Dave
Previous Topic:Search for Element Declaration
Next Topic:Possible errors in the XSD facet item providers
Goto Forum:
  


Current Time: Wed Jul 23 12:22:30 EDT 2014

Powered by FUDForum. Page generated in 0.06341 seconds