- From: Roman Rytov <roman@davinci.co.il>
- Date: Tue, 5 Jun 2001 08:52:08 +0200
- To: "'Paul Jakubik'" <pauljakubik@yahoo.com>, "'xmlschema-dev@w3.org'" <xmlschema-dev@w3.org>
- Message-ID: <6F8B2136D80AD411A37A0050DA61D520651DF5@LEONARDO>
I used to have this kind of problem. Actually schema syntax is a bit confusing. There are some headers from my both kinds of files (XSD and XML using it) Basic file includes all symple, complex, abstract and so on types. Its name's Common.xsd. Its header is: <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:zoogi:schemas:ZCommon" xmlns:ZCommon="urn:zoogi:schemas:ZCommon"> Another schema file that uses some types from previous one. Its file name's ZMoney. The header is: <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ZCommon="urn:zoogi:schemas:ZCommon"> and to include definitions of ZCommon I use next line: <xsd:import namespace="urn:zoogi:schemas:ZCommon" schemaLocation="file:D:/zoogi/schemas/common.xsd"/> Finally in an instance XML document I can use next header: <RootTag xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="d:\zoogi\schemas\ZMoney.xsd"> But this XML document does NOT use namespaces. As you can see I use RootTag but not ZMoney:RootTag. //Roman Rytov -----Original Message----- From: xmlschema-dev-request@w3.org [mailto:xmlschema-dev-request@w3.org]On Behalf Of Paul Jakubik Sent: Monday, June 04, 2001 23:45 To: xmlschema-dev@w3.org Subject: Re: validating xml schemas with the standard schema I am still having problems getting things to work. I am using Xerces 1.4.0. I use a header that looks something like this: <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="file:///e:/paul/maple/schema-evolve/validate-files/XMLSc hema.xsd"> I keep getting errors that look like: org.xml.sax.SAXParseException: General Schema Error: Grammar with uri 2: http://www.w3.org/2001/XMLSchema , can not be found. Am I missing something obvious? I need to read the schema locally as opposed to going over the net, so I am trying to set the location to a local file where I have copied it. So what is the right way to set attributes in the schema to make this happen? Any help would be appreciated, --Paul __________________________________________________ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail - only $35 a year! http://personal.mail.yahoo.com/
Received on Tuesday, 5 June 2001 02:50:47 UTC