By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
449,401 Members | 1,212 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 449,401 IT Pros & Developers. It's quick & easy.

xml schema and derivation by restriction

P: n/a
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
Share this Question
Share on Google+
3 Replies


P: n/a
/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

P: n/a
/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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.