[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: W3C XML Schema best practice : inclusions

  • From: Eric van der Vlist <vdv@d...>
  • To: "xml-dev@l..." <xml-dev@l...>
  • Date: Tue, 07 Nov 2000 11:20:54 +0100

xml schema inclusion
"Henry S. Thompson" wrote:
> 
> Eric van der Vlist <vdv@d...> 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@c...
>                      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
------------------------------------------------------------------------

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.