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

RE: embedding xml schema in an instance doc

  • To: <peej@m...>,<xml-dev@l...>
  • Subject: RE: embedding xml schema in an instance doc
  • From: "Dare Obasanjo" <dareo@m...>
  • Date: Sun, 9 Jun 2002 01:52:09 -0700
  • Thread-index: AcIPd9xDLCSXqEuDTSuapyLbI5yE5QAGvhED
  • Thread-topic: embedding xml schema in an instance doc

embedding xsd in xml
The XmlValidatingReader class supports validating documents with inline W3C XML Schema definitions. More information is available at 
 
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconvalidationwithinlinexsdschema.asp

	-----Original Message----- 
	From: peej@m... [mailto:peej@m...] 
	Sent: Sat 6/8/2002 10:37 PM 
	To: xml-dev@l... 
	Cc: 
	Subject:  embedding xml schema in an instance doc
	
	

	Hi,
	
	I'm attempteng to embed XML Schema elements within an instance document and running into trouble when Xerces attempts to validate, although XML Spy has no problem.  What I'd like to be able to do is put a "fragment" of XML Schema within an instance doc...like so:
	
	...
	<structure>
	 <xsd:element name="record">
	  <xsd:complexType>
	   <xsd:sequence>
	    <xsd:element ref="darwin:DateLastModified" />
	    <xsd:element ref="darwin:InstitutionCode" />
	    <xsd:element ref="darwin:CollectionCode" />
	    <xsd:element ref="darwin:CatalogNumber" />
	    <xsd:element ref="darwin:ScientificName" />
	    <xsd:element ref="darwin:Genus" />
	    <xsd:element ref="darwin:Species" />
	   </xsd:sequence>
	  </xsd:complexType>
	 </xsd:element>
	</structure>
	...
	
	I've tried a variety of things involving namespace declarations and namespace locations.  I'm wondering if I should even be able to do this.  Does an xml schema doc exist specifying XML Schema and if it does, should I not just be able to reference it from an instance as if it were any other schema document, via its namespace?
	
	Any help would be appreciated!  Thanks in advance.
	
	P.J.
	
	-----------------------------------------------------------------
	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://lists.xml.org/ob/adm.pl>
	
	


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.