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

RE: Schema Namespace name, schemaLocation, and Schema Versioni

  • To: "Naren Koka" <NKoka@s...>,"Xml-Dev (E-mail)" <xml-dev@l...>
  • Subject: RE: Schema Namespace name, schemaLocation, and Schema Versioning
  • From: "Dare Obasanjo" <dareo@m...>
  • Date: Tue, 16 Jul 2002 17:08:52 -0700
  • Thread-index: AcItGL37jWEmx0jdS6mbvqt2QefVAwAC0moQAAB/RFA=
  • Thread-topic: Schema Namespace name, schemaLocation, and Schema Versioning

xsd versioning
Change namespaces on both the instance and schema document 

[s.xsd]
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
	<xsd:element name="root">
		<xsd:complexType>
			<xsd:sequence>
				<xsd:element name="grade"
type="xsd:string"/>
			</xsd:sequence>
		</xsd:complexType>
	</xsd:element>
</xsd:schema>


[s.xml]
<?xml version="1.0" encoding="UTF-8"?>
<root xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="s.xsd" >
	<grade>a</grade>
</root>

-- 
PITHY WORDS OF WISDOM 
The primary function of the design engineer is to make things difficult
for the fabricator and impossible for the serviceman.

This posting is provided "AS IS" with no warranties, and confers no
rights. 



> -----Original Message-----
> From: Naren Koka [mailto:NKoka@s...] 
> Sent: Tuesday, July 16, 2002 5:03 PM
> To: Xml-Dev (E-mail)
> Subject: RE:  Schema Namespace name, schemaLocation, 
> and Schema Versioning
> 
> 
> The schmalocation itself is pretty confusing.  For example I 
> have the following xml and xsd
> 
> [s.xsd]
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <xsd:schema xmlns:xsd="http://www.w3.org/2000/1/XMLSchema">
> 	<xsd:element name="root">
> 		<xsd:complexType>
> 			<xsd:sequence>
> 				<xsd:element name="grade" 
> type="xsd:string"/>
> 			</xsd:sequence>
> 		</xsd:complexType>
> 	</xsd:element>
> </xsd:schema>
> 
> [s.xml]
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <root 
> xmlns:xsi="http://www.w3.org/2000/10/XMLSchema-instance" 
> xsi:noNamespaceSchemaLocation="s.xsd" >
> 	<grade>a</grade>
> </root>
> 
> It does not matter what I change the values of xmlns:xsi and 
> the location I get the same errors.  I have s.xsd in the same 
> directory.  Even if I change the file name, there is no 
> effect.  How can I make it look at the schema defined in the 
> same dierctory?
> 
> [Error] s.xml:2:103: Element type "root" must be declared. 
> [Error] s.xml:3:9: Element type "grade" must be declared.
> s.xml: 280 ms (2 elems, 1 attrs, 0 spaces, 4 chars)
> 
> What is the purpose of the reference to w3.org?  Is the 
> parser going to connect to the website and check the 
> definitions?  Does this require connectivity to the web site 
> for working?
> 
> Thanks,
> Naren
> 
> >  
> 
> -----------------------------------------------------------------
> 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.