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

RE: clarification needed for include


for include
> -----Original Message-----
> From: Takuki Kamiya [mailto:tkamiya@u...] 
> Sent: Sunday, March 06, 2005 1:33 AM
> To: www-xml-schema-comments@w...; xml-dev@l...
> Subject:  clarification needed for include
> 
> Hi,
> 
> Section 4.2.1 in XML Schema Part 1 2nd Ed mentions in the 
> "schema representation constraint" section that:
> 
> "1.2 It resolves to a <schema> element information item in a 
> well-formed information set, which in turn corresponds to a 
> valid schema."
> (In http://www.w3.org/TR/xmlschema-1/#layer2)
> 
> It basically asserts that the schema document being included 
> has to be "valid". I am not so sure what this "valid" means.
> 
> Is it "valid" in terms of what? I guess it is probably meant 
> to be "valid" against the whole XML Schema specification.

Yes, that is correct. More specifically, it must be valid according to
the rules specified in "C.1 Validation Rules" in XML Schema Part 1 2nd
Edition.

> If it is the case there's another question.
> 
> Say for example, schema A includes schema B, and B uses a 
> component (eg. type definition) that is defined in schema A.
> 
> My question is: does schema B have to also "include" schema A?
> If B does not include A, then schema B is now "invalid" since 
> it does not validate as a stand-alone schema document because 
> some of the references (eg. type references) do not (cannot) 
> resolve without being aware of components in  schema A.

Schema B has to include Schema A - that is, Schema B must be able to
validate as a stand-alone schema.

However, regarding inclusion in an XML instance document (separate but
related issue) - if you had the following case:
		
	   includes		    includes
Schema A --------> Schema B --------> Schema C

Then in an XML instance document you would only need to list Schema A in
the "schemaLocation" attribute of the <include> element in the instance
document - that is, the schema processor is responsible for resolving
the reference of Schema C from Schema B. You would not be required to
list Schema B or Schema C in the "schemaLocation" attribute.

Kind Regards,
Joseph Chiusano
Booz Allen Hamilton
Strategy and Technology Consultants to the World
 
> I know I can experiment with the implementations, which I did 
> including ours and got different results. Only one 
> implementation required schema B to include A, but others did 
> not care about it.
> 
> Any comments are appreciated.
> 
> Thank you,
> 
> -Takuki Kamiya (Fujitsu Software Corporation)
> 
> 
> 
> -----------------------------------------------------------------
> 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>
> 
> 

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.