[
Lists Home |
Date Index |
Thread Index
]
- From: Eric van der Vlist <vdv@dyomedea.com>
- To: "xml-dev@lists.xml.org" <xml-dev@lists.xml.org>
- Date: Tue, 07 Nov 2000 11:20:54 +0100
"Henry S. Thompson" wrote:
>
> 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.
This is a good point.
I wonder to what extent it cannot be applied to many (most ?) of the XML
vocabulary, in which case, the use of XInclude (and XLink) would be
compromized.
Interestingly, XLink is providing semantic attributes that can be used
to control the semantics.
Might it be something missing from XInclude ?
A simple XLink (with xlink:show="embed|other" and xlink:role="xml schema
inclusion uri") might have been a better candidate than XInclude, then.
> > 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.
Thanks for the clarification.
These are new grounds for me and I don't see clearly what the benefit
could be, but this is definitely a differentiation between W3C XML
Schema inclusion and XInclude (or XLink then).
It would be dangerous and complex, but this is meaning that you can
include small portions of a schema using XInclude...
Eric
> 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/
--
------------------------------------------------------------------------
Eric van der Vlist Dyomedea http://dyomedea.com
http://xmlfr.org http://4xt.org http://ducotede.com
------------------------------------------------------------------------
|