473,324 Members | 2,417 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

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 2895
/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
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...
1
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...
3
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>> >...
1
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...
12
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: ...
0
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...
0
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...
3
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" />...
2
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...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.