[
Lists Home |
Date Index |
Thread Index
]
You have multiple senses for that term and they
overlap in browser/rendering applications.
In one sense in which the term was originally used,
it is a document with multiple semantics. The problem
is 'semantics by intension' or by 'extension'. In
other words, by class or by collection.
The fact of schema validation doesn't affect that
definition. XML Has No Meaning.
So do you want the syntactical/structural fact of
compounding or the class/collection semantic fact of
compounding. A browser has to do both so the validation
of the syntactic/structural compound has value or you
get into dynamic loading on parse issues.
SGML DTDs with NOTATION declarations acted as much as
reference architecture contracts as they ever did as
runtime specifications for instance conformance.
len
From: Roger L. Costello [mailto:costello@mitre.org]
Hi Folks,
I am still unclear on what a compound document is.
1. What is a compound document?
A compound document is an XML document comprised of elements from
independently developed schemas. For example, an XML document that is
comprised of elements from the SVG schema and elements from the XHTML schema
is a compound document.
2. How is this different from an instance document that conforms to an XML
Schema that uses the <any/> element ?
Suppose that my Book schema uses an <any/> element after the declaration for
Title:
targetNamespace="http://www.books.org"
<element name="Book">
<complexType>
<sequence>
<element name="Title" type="string"/>
<any namespace="##other"/>
<element name="Author" type="string"/>
<element name="Date" type="string"/>
<element name="ISBN" type="string"/>
<element name="Publisher" type="string"/>
</sequence>
</complexType>
</element>
This declaration of Book states that "After the Title element you can have
any element from any other namespace".
So, an XML document could thus contain elements from the book namespace and
the XHTML namespace:
<Book xmlns="http://www.books.org">
<Title>The First and Last Freedom</Title>
<HTML xmlns="http://www.w3.org/TR/REC-xhtml">
<BODY>Hello World</BODY>
</HTML>
<Author>J. Krishnamurti</Author>
<Date>1954</Date>
<ISBN>0-06-064831-7</ISBN>
<Publisher>Harper & Row</Publisher>
</Book>
Is this a compound document? It meets the above definition, i.e., the
instance document is comprised of elements from independently developed
schemas and namespaces.
I am guessing that it is not a compound document. True?
I am guessing that a compound document entails more than simply an instance
document comprised of elements from multiple vocabularies.
I am guessing that if the Book schema were declared without the <any/>
element, e.g.,
targetNamespace="http://www.books.org"
<element name="Book">
<complexType>
<sequence>
<element name="Title" type="string"/>
<element name="Author" type="string"/>
<element name="Date" type="string"/>
<element name="ISBN" type="string"/>
<element name="Publisher" type="string"/>
</sequence>
</complexType>
</element>
And an instance document inserted an XHTML element after the Title element:
<Book xmlns="http://www.books.org">
<Title>The First and Last Freedom</Title>
<HTML xmlns="http://www.w3.org/TR/REC-xhtml">
<BODY>Hello World</BODY>
</HTML>
<Author>J. Krishnamurti</Author>
<Date>1954</Date>
<ISBN>0-06-064831-7</ISBN>
<Publisher>Harper & Row</Publisher>
</Book>
Then this instance document is a compound document. Is this true?
If so, then by definition a compound document cannot be validated by an XML
Schema validator. Correct? For example, an XML Schema validator would
reject the above instance document, saying "invalid element after Title,
expecting Author".
So, what is a compound document?
/Roger
-----------------------------------------------------------------
The xml-dev list is sponsored by XML.org <http://www.xml.org>, an
initiative of OASIS <http://www.oasis-open.org>
The list archives are at http://lists.xml.org/archives/xml-dev/
To subscribe or unsubscribe from this list use the subscription
manager: <http://www.oasis-open.org/mlmanage/index.php>
|