[
Lists Home |
Date Index |
Thread Index
]
- From: ht@cogsci.ed.ac.uk (Henry S. Thompson)
- To: Eric van der Vlist <vdv@dyomedea.com>
- Date: Tue, 07 Nov 2000 09:19:06 +0000
Eric van der Vlist <vdv@dyomedea.com> writes:
> The specific semantic of xsd:include appears then to be very low and one
> may wonder why a generic inclusion mechanism couldn't be used.
>
> The obvious advantage is that generic inclusion mechanism are readable
> by any supporting tool.
There's a widely-supported assertion in computer science that
text-substitution macros are dangerous mechanisms to use to bring
extensibility to a language. We chose to put <include> in the
language to allow us to control its semantics. One important
side-effect is that tools can depend on its effects in a way they
can't with text-inclusion mechanisms such as XInclude and general
entities.
> One should note that W3C XML Schema does also support XPointers within
> xsd:include or redefine [3]:
>
> "1.1 If the normalized value of the schemaLocation [attribute]
> successfully resolves, it resolves either
> 1.1.1 to (a fragment of) a resource of type text/xml, which in turn
> corresponds to a schema element information item in a well-formed
> information set, which in turn corresponds to a valid schema ..."
>
> My reading of this is that you can include, using xsd:include and a
> XPointer identifying a text/xml fragment, a single element definition
> such as:
>
> <xsd:element name="foo" type="ns1:bar"/>
Not so. The above quote says explicitly (you've lost the formatting
which makes this clear) that the identified resource must be a
<schema> EII. This is crucial -- otherwise how would we know, for
instance, whether an element was global or local in its schema?
Including or importing fragments would open up a whole complex design
issue for, in my opinion, very little gain.
ht
--
Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh
W3C Fellow 1999--2001, part-time member of W3C Team
2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440
Fax: (44) 131 650-4587, e-mail: ht@cogsci.ed.ac.uk
URL: http://www.ltg.ed.ac.uk/~ht/
|