W3C home > Mailing lists > Public > www-xml-xinclude-comments@w3.org > March 2002

Resolving ID/IDREF conflicts

From: Roger L. Costello <costello@mitre.org>
Date: Sat, 30 Mar 2002 14:04:17 -0500
Message-ID: <3CA60C31.6590F7B6@mitre.org>
To: www-xml-xinclude-comments@w3.org
CC: costello@mitre.org
I am trying real hard to understand the proposed method for resolving
ID and IDREF conflicts [section 4.5.3].  Alas, after many, many rereads
I do not understand.  I understand best when I see a concrete example,
so please allow me to consider this example of a <Library> containing a
<BookCatalogue> section and a <GuestAuthors> section:

<?xml version="1.0"?>
        <Book isbn="_94303-12021-43892">
                <Title>My Life and Times</Title>
                <Author>Paul McCartney</Author>
                <Publisher>McMillin Publishing</Publisher>
        <Book isbn="_0-440-34319-4">
                <Title>Illusions The Adventures of a Reluctant 
                <Author>Richard Bach</Author>
                <Publisher>Dell Publishing Co.</Publisher>
        <Book isbn="_0-06-064831-7">
                <Title>The First and Last Freedom</Title>
                <Author>J. Krishnamurti</Author>
                <Publisher>Harper &amp; Row</Publisher>
            <Name>Richard Bach</Name>
            <BookForSigning isbn_ref="_0-440-34319-4">
                <Title>Illusions The Adventures of a Reluctant

The isbn_ref attribute on the <BookForSigning> element is of type
IDREF.  Its purpose is to point to the corresponding <Book> in the
<BookCatalogue> section.  Each <Book> has an ID attribute, isbn.

First Question:

Suppose that the library has another document that includes the
<BookForSigning> element.  Here's the include element:


What would the resulting document look like?  Is the isbnRef
value left dangling in the result document?

Second Question:

Suppose that instead of including the <BookForSigning> element I
one of the <Book> elements.  Note that each <Book> element has an ID
attribute, isbn.  Suppose that the including document already has an
element with the same ID value:

    <foo id="_94303-12021-43892"/>

What will the resulting document look like?

Received on Saturday, 30 March 2002 14:06:56 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 19:58:56 UTC