473,624 Members | 2,534 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:complexTyp e name="Ethnicity CodeType">
<xsd:simpleCont ent>
<xsd:extensio n base="nibrs:Eth nicityCodeType" >
<xsd:attributeG roup ref="j:SuperTyp eMetadata"/>
</xsd:extension>
</xsd:simpleConte nt>
</xsd:complexType >
Thanks for your answers.
Eric

Jan 31 '07 #1
2 1356
On 31 Jan, 06:22, "Eric D" <ericdesha...@g mail.comwrote:
Hi,
is such a complex type valid?
<xsd:complexTyp e name="Ethnicity CodeType">
<xsd:simpleCont ent>
<xsd:extensio n base="nibrs:Eth nicityCodeType" >
<xsd:attributeG roup ref="j:SuperTyp eMetadata"/>
</xsd:extension>
</xsd:simpleConte nt>
</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:Ethnicity CodeType 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...@g mail.comwrote:
Hi,
is such a complex type valid?
<xsd:complexTyp e name="Ethnicity CodeType">
<xsd:simpleCont ent>
<xsd:extensio n base="nibrs:Eth nicityCodeType" >
<xsd:attributeG roup ref="j:SuperTyp eMetadata"/>
</xsd:extension>
</xsd:simpleConte nt>
</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
2774
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. so submitting the empty form should show error message in red , then show form, but all it does is show form. I checked the variable to make shore they ere ok and they are fine. i believe it is a logical error with my if else.... I eved...
3
23429
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 implement an interface. I have the interface defined in a separate class, like this: public interface IPanel { boolean onNext(); String nextPanel(); boolean hasCancel();
3
1957
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
4660
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 " in class Converter below that it extends from a Frame instead from an Applet then the whole program krasch with message "An exception 'java.lang.IllegalArgumentException' has occured in ... I mean that if I run this program as an application I...
3
1585
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" use="required"/> <xs:attribute name="Name" type="xs:string" use="required"/> </xs:extension>
1
6338
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 anyone help direct me towards figuring out the cause. Yes, the xml is big, but not too complex.
4
1532
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 have Accessors and Mutator Methods. When I'm trying to create the Public buyterTracker I get an error but it does not tell me what kind of error
3
3838
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" /> </xs:restriction> </xs:simpleContent>
1
1355
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
8231
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8672
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8330
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8471
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7153
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5561
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4075
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2603
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 we have to send another system
2
1474
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.