xml schema and derivation by restriction

Discussion in 'XML' started by hre1@lycos.de, Dec 30, 2004.

  1. Guest

    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
    , Dec 30, 2004
    #1
    1. Advertising

  2. //:

    > 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
    Stanimir Stamenkov, Dec 30, 2004
    #2
    1. Advertising

  3. //:
    > /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
    Stanimir Stamenkov, Dec 30, 2004
    #3
  4. () 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:
    URL: http://www.ltg.ed.ac.uk/~ht/
    [mail really from me _always_ has this .sig -- mail without it is forged spam]
    Henry S. Thompson, Jan 7, 2005
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Benjamin Michotte

    derivation, restriction, extension, ...

    Benjamin Michotte, Sep 5, 2003, in forum: XML
    Replies:
    1
    Views:
    496
    Bob Foster
    Sep 5, 2003
  2. Dietmar Gräbner
    Replies:
    1
    Views:
    384
    Priscilla Walmsley
    Jul 19, 2004
  3. Replies:
    1
    Views:
    442
    Stan Kitsis [MSFT]
    Dec 29, 2004
  4. Replies:
    1
    Views:
    384
    Stan Kitsis [MSFT]
    Dec 29, 2004
  5. Steven T. Hatton
    Replies:
    12
    Views:
    1,695
    Jonathan Turkanis
    Aug 20, 2004
Loading...

Share This Page