473,786 Members | 2,445 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

xml schema and derivation by restriction

stan,

once more, thank you for your assistance and patience.
can you explain in more detail why my code violates the particle
restriction ok (Elt:Elt -- NameAndTypeOK)?
i tried to understand the w3c recommendation but the complexity is
dazzling.

best regards
jeff
Jul 20 '05 #1
3 2942
/hr**@lycos.de/:
once more, thank you for your assistance and patience.
can you explain in more detail why my code violates the particle
restriction ok (Elt:Elt -- NameAndTypeOK)?
i tried to understand the w3c recommendation but the complexity is
dazzling.


I'm not Stan Kitsis, but seems like you're redefining the types of
the composition elements "a1" and "a2", while you want only to
restrict their appearance in the "ct_2" type (excluding the "a3"
element), I guess. Probably you should use another
'restriction/extension' for the "a1" and "a2" element types if you
want to change them for the "ct_2" type, otherwise - you will get error.

--
Stanimir
Jul 20 '05 #2
/hr**@lycos.de/:
/Stan Kitsis [MSFT]/:
Your code violates the following constraint (Schema Component Constraint:
Particle Restriction OK (Elt:Elt -- NameAndTypeOK)) :
http://www.w3.org/TR/xmlschema-1/#rcase-NameAndTypeOK
once more, thank you for your assistance and patience.
can you explain in more detail why my code violates the particle
restriction ok (Elt:Elt -- NameAndTypeOK)?
i tried to understand the w3c recommendation but the complexity is
dazzling.


Probably you should focus on this paragraph from the above mentioned
fragment:
3.2.5 R's {type definition} is validly derived given {extension,
list, union} from B's {type definition} as defined by Type
Derivation OK (Complex) (§3.4.6) or Type Derivation OK (Simple)
(§3.14.6), as appropriate.
Note: The above constraint on {type definition} means that in
deriving a type by restriction, any contained type definitions must
themselves be explicitly derived by restriction from the
corresponding type definitions in the base definition, or be one of
the member types of a corresponding union.


--
Stanimir
Jul 20 '05 #3
hr**@lycos.de (hr**@lycos.de) writes:
once more, thank you for your assistance and patience.
can you explain in more detail why my code violates the particle
restriction ok (Elt:Elt -- NameAndTypeOK)?
i tried to understand the w3c recommendation but the complexity is
dazzling.


For one complex type definition to restrict another, the type
definitions of corresponding element declarations in their content
models must be _declared_ to have identical (top-level, same name) or
derived-by-restriction-from-one-another type definitions.

ht
--
Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh
Half-time member of W3C Team
2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440
Fax: (44) 131 650-4587, e-mail: ht@inf.ed.ac.uk
URL: http://www.ltg.ed.ac.uk/~ht/
[mail really from me _always_ has this .sig -- mail without it is forged spam]
Jul 20 '05 #4

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

Similar topics

4
2936
by: Lénaïc Huard | last post by:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hello, I've some namespace problems when defining default values for attributes. My problem seems to come from the fact that the attributes are defined in a different namespace from the element.
1
505
by: hre1 | last post by:
hello stan, thank you very much for your fast replay! your solution will help to solve my problem. but i try to understand !why! sqc and xmlspy produce this messages: SQC means:TYPE REFINEMENT ERROR (content type incompatible with the content type of the basetype) and
3
1612
by: Wells Caughey | last post by:
I am trying to create an XML Schema type definition by deriving from another type definition using restriction. For example suppose my base type was this: <xs:schema <<schema element setup>> > <xs:complexType name="Fruits"> <xs:sequence> <xs:any minOccurs="8" maxOccurs="8"/> </xs:sequence> </xs:complexType>
1
1194
by: Soren Kuula | last post by:
Hi, 1) If I have a definition + declaration like <complexType name="fattype"> <complexContent> <element name="bar" minOccurs="0" maxOccurs="342"/> </complexContent> <attribute name="shanyang"/> </complexType>
12
2430
by: steve_marjoribanks | last post by:
I'm fairly new to XML and schemas and I'm trying to work out why a schema I've been given keeps throwing up validation errors in XMLSpy. The section of code with the problem is: <!--============= Element =============--> <element name="conResults" type="agsml:CongArrayType" substitutionGroup="agsml:_congProperty"/> <!--============= ComplexType =============--> <complexType name="CongArrayType"> <complexContent>
0
2693
by: Mark Parter | last post by:
I'm trying convert an XML Schema (http://www.elframework.org/projects/xcri/efc_r1.0.xsd/view) to a VB.Net class using the XSD tool provided with the .NET 2 SDK. However, it's failing to generate the class and is outputting the following error(s); Schema validation warning: Undefined complexType 'http://purl.org/dc/elements/1.1/:SimpleLiteral' is used as a base for complex type extension. Line 433, position 5. Schema validation warning:...
0
2632
by: rautsmita | last post by:
hello friends , i am using to jdk6 and JAXB2.0, i have geomtry.xsd file i am trying to compile this file using jaxb but i got some error i.e.The particle of the type is not a valid restriction of the particle of the base this xsd file is valid as per w3c standard i am also providing error in detail and geometry.xsd file geometry.xsd <?xml version="1.0" encoding="UTF-8"?> <schema targetNamespace="http://www.opengis.net/gml"...
3
3854
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>
2
6379
by: MarianM | last post by:
Hi all, how to validate xades xml against xades and xmlsig schemas? i have this sample: XmlTextReader xmlReader = new XmlTextReader(@"..\..\Data\xades_zep- epes.xml"); XmlReaderSettings settings = new XmlReaderSettings(); settings.ProhibitDtd = false; settings.ValidationType = ValidationType.Schema;
0
9647
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
10163
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9960
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
8988
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
6744
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
5397
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
4064
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
3668
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2894
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.