473,499 Members | 1,738 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

simplecontent that extends itself, is that valid??

Hi,
is such a complex type valid?
<xsd:complexType name="EthnicityCodeType">
<xsd:simpleContent>
<xsd:extension base="nibrs:EthnicityCodeType">
<xsd:attributeGroup ref="j:SuperTypeMetadata"/>
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
Thanks for your answers.
Eric

Jan 31 '07 #1
2 1345
On 31 Jan, 06:22, "Eric D" <ericdesha...@gmail.comwrote:
Hi,
is such a complex type valid?
<xsd:complexType name="EthnicityCodeType">
<xsd:simpleContent>
<xsd:extension base="nibrs:EthnicityCodeType">
<xsd:attributeGroup ref="j:SuperTypeMetadata"/>
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
Thanks for your answers.
Eric
Assuming this is a definition in the namespace associated with the
namespace prefix nibrs...

I couldn't explicitly find text in the spec that prevents this, but
even if it is intended to be allowed (rather than just not considered)
I would say that it is a corner case and best avoided.

OTOH - if nibrs:EthnicityCodeType is in a different namespace then it
is obviously OK.

HTH,

Pete.
--
=============================================
Pete Cordell
Tech-Know-Ware Ltd
for XML to C++ data binding visit
http://www.tech-know-ware.com/lmx
(or http://www.xml2cpp.com)
=============================================

Jan 31 '07 #2
Hi Eric,

You cannot do that, for more details see
http://www.w3.org/TR/xmlschema-1/#ct-props-correct
Point 3:
***
3 Circular definitions are disallowed, except for the ·ur-type
definition·. That is, it must be possible to reach the ·ur-type
definition· by repeatedly following the {base type definition}.
***

Best Regards,
George
---------------------------------------------------------------------
George Cristian Bina
<oXygen/XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com

On Jan 31, 8:22 am, "Eric D" <ericdesha...@gmail.comwrote:
Hi,
is such a complex type valid?
<xsd:complexType name="EthnicityCodeType">
<xsd:simpleContent>
<xsd:extension base="nibrs:EthnicityCodeType">
<xsd:attributeGroup ref="j:SuperTypeMetadata"/>
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
Thanks for your answers.
Eric

Jan 31 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
2759
by: Norman Bird | last post by:
I have a form i will use to register new people and when I click the submit button, the form just shows itself. It is supposed to show a message showing field errors if you leave fields blank etc....
3
23424
by: Hal Vaughan | last post by:
I'm creating a sequence of JPanels that will each, in turn, be added to (then removed from) a window (kind of like a wizard). I want these panels to not only extend the JPanel class, but to...
3
1941
by: David Norman | last post by:
How can I create an xml schema where both of the following documents are valid? <theElement> <child>some text</child> </theElement> and <theElement>1234</theElement>
1
4657
by: Tony Johansson | last post by:
Hello experts! As this program is now it's works perfectly when running as a application or as an Applet. Now to my question if I just change this row "public class Converter extends Applet "...
3
1576
by: SideByEach | last post by:
Check out the sample XML below. Sample XML: <xs:element name="Image"> <xs:complexType> <xs:simpleContent> <xs:extension base="xs:string"> <xs:attribute name="Type" type="xs:string"...
1
6317
by: Random | last post by:
I don't understand why this error is happening when I try to load my xml into my DataSet. "Cannot add a nested relation or an element column to a table containing a SimpleContent column." Can...
4
1528
by: sandyw | last post by:
I need a little help here with extends. I have three class 1. EventsClass 2. TicketClass I have the extends to EventsClass 3. BuyerClass. I have the extends to EventsClass All three class...
3
3825
by: Kai Schlamp | last post by:
Hello! In my schema I have the following: <xs:complexType name="textareaType"> <xs:simpleContent> <xs:restriction base="xs:string"> <xs:attribute ref="label" use="required" />...
1
1346
by: Thijs | last post by:
Hej, I want to achieve the following situation: <mytag>foo</mytag> or: <mytag><other ref="bar"/></mytag> So mytag contains either text (simplecontent) or the other element.
0
7128
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7215
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6892
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5467
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4917
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3088
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1425
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
661
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
294
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.