What is the difference between IDREF and IDREFS in XSD?

11,268

An attribute of type IDREF is a reference to some other element with an attribute of type ID.

An attribute of type IDREFS is a list of references to elements with ID attributes, separate by spaces.

An example:

You're creating a family tree. Each person has 2 parents, a mother and a father. This would be denoted by IDREFS like so:

<person person_id="e10001" parent_id="e10002 e10003">

with

  <!ATTLIST person
person_id ID #REQUIRED
parent_id IDREFS #IMPLIED>
Share:
11,268

Related videos on Youtube

user990635
Author by

user990635

Updated on September 15, 2022

Comments

  • user990635
    user990635 over 1 year

    What is the difference between IDREF and IDREFS in XSD?
    I know they both reference the ID attribute, but what is the difference? When each one of them is used?