Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » XML Schema Definition (XSD) » duplicate element in one namespace
duplicate element in one namespace [message #42504] Wed, 28 April 2004 16:27 Go to next message
Andy Scherzinger is currently offline Andy ScherzingerFriend
Messages: 31
Registered: July 2009
Member
Hi all,

is the following possible?

....
<xsd:complexType name="foo">
<xsd:sequence>
<xsd:element name="elem1" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
....
<xsd:complexType name="bar">
<xsd:sequence>
<xsd:element name="elem1" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>

So the element "elem1" exists in both complexTypes and the same
NameSpace. It is distinguishable via complexTypes, but still has the
same name. Is this possible

Any suggestions?

regards,
---Andy
Re: duplicate element in one namespace [message #42538 is a reply to message #42504] Wed, 28 April 2004 16:56 Go to previous message
Eclipse UserFriend
Originally posted by: merks.ca.ibm.com

Andy,

Yes, this is perfectly legal.


Andy Scherzinger wrote:

> Hi all,
>
> is the following possible?
>
> ...
> <xsd:complexType name="foo">
> <xsd:sequence>
> <xsd:element name="elem1" type="xsd:string"/>
> </xsd:sequence>
> </xsd:complexType>
> ...
> <xsd:complexType name="bar">
> <xsd:sequence>
> <xsd:element name="elem1" type="xsd:string"/>
> </xsd:sequence>
> </xsd:complexType>
>
> So the element "elem1" exists in both complexTypes and the same
> NameSpace. It is distinguishable via complexTypes, but still has the
> same name. Is this possible
>
> Any suggestions?
>
> regards,
> ---Andy
Re: duplicate element in one namespace [message #586178 is a reply to message #42504] Wed, 28 April 2004 16:56 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33113
Registered: July 2009
Senior Member
Andy,

Yes, this is perfectly legal.


Andy Scherzinger wrote:

> Hi all,
>
> is the following possible?
>
> ...
> <xsd:complexType name="foo">
> <xsd:sequence>
> <xsd:element name="elem1" type="xsd:string"/>
> </xsd:sequence>
> </xsd:complexType>
> ...
> <xsd:complexType name="bar">
> <xsd:sequence>
> <xsd:element name="elem1" type="xsd:string"/>
> </xsd:sequence>
> </xsd:complexType>
>
> So the element "elem1" exists in both complexTypes and the same
> NameSpace. It is distinguishable via complexTypes, but still has the
> same name. Is this possible
>
> Any suggestions?
>
> regards,
> ---Andy


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:duplicate element in one namespace
Next Topic:New Library for generating xml instance etc.. etc..
Goto Forum:
  


Current Time: Thu Mar 28 09:35:16 GMT 2024

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

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

Back to the top