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

Re: tricky validation problem w multiple schemas

  • To: "Naomi Dushay" <Naomi@c...>
  • Subject: Re: tricky validation problem w multiple schemas
  • From: ht@c... (Henry S. Thompson)
  • Date: 20 Nov 2001 12:13:36 +0000
  • Cc: <xml-dev@l...>
  • In-reply-to: "Naomi Dushay"'s message of "Mon, 19 Nov 2001 14:13:28 -0500"
  • References: <706871B20764CD449DB0E8E3D81C4D43021DEA34@o...>
  • User-agent: Gnus/5.0805 (Gnus v5.8.5) XEmacs/21.2(beta13) (Demeter)

naomi dushay
"Naomi Dushay" <Naomi@c...> writes:

<snip/>

> instance doc 2:
> 
> <DO xsi:noNamespaceSchemaLocation="DO.xsd">
> 	<DS DSID="a">
> 		<MIME>text/plain</MIME>
> 	</DS>
> 	<DS DSID="b">
> 		<MIME>image/gif</MIME>
> 	</DS>
> 	<FRIP FID="f1">
> 		<desc>this is an instance of a Q frip</desc>
> 		<FSch:root xmlns:FSch="http://fsch.ns"
> xsi:schemaLocation="http://fsch.ns FRIPQ.xsd">
> 			<FSch:roleq1 RDSID="a" />
> 			<FSch:roleq2 RDSID="b" />
> 		</FSch:root>
> 	</FRIP>
> </DO>
> 
> I can validate instance doc 2 against DO.xsd.
> 
> If I snip out the FSch qualified XML, I can validate that against
> FRIPQ.xsd.
> 
> 
> But I'm still not happy:
> 
> 1.	Neither XML Spy nor Topologi has a way for me to validate the
> appropriate piece of XML instance doc 2 against FRIPQ "in situ."  That
> is, the only way I've found to validate against FRIPQ.xsd is to snip out
> that piece of XML and make it a separate instance doc.

XSV will handle this one just fine -- whenever it hits a previously
unseen namespace, it looks for an xsi:schemaLocation attribute and
does the right thing.

> 2.	RDSID within a frip role tag is supposed to be an IDREF to a
> DSID attribute in a DS tag.
> 
> 	But in the above model, my frip schema doesn't know about DO.xsd
> ... so how can they refer to XML in the DO?

RDSID is an IDREF, the IDs will be IDs, it should all work.

> Is there a way for me to do all of these:
> 
> 	a.  have DO schema that will allow extensible frips to be
> plugged in at the appropriate spot.
> 
> 	b.  DO schema doesn't know anything about specific frip schemas,
> only DO instance docs know about specific frip schemas.
> 
> 	c.  specific frip validating doc can be used to validate
> specific frip instance in DO instance doc.
> 
>  	d.  specific frip validating doc can validate:
> 		i.	correct role elements for specific frip
> 		ii.	attribute RDSID for each role is an IDREF
> refering to a DSID in a DS element in DO instance doc.
> 		iii.	match RDSID for each role to DSID pertaining to
> correct MIME type specified (e.g. for Frip Q, roleq1 must match DS with
> MIME "text/plain")

(a), (b), (c), (d) i and ii are fine with W3C XML Schema.  (d)iii is
application logic/business rule, and W3C XML Schema can't help.

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/

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.