Skip to Content.
Sympa Menu

xom-interest - Re: [XOM-interest] XSD Schema and Validation problems

xom-interest AT lists.ibiblio.org

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: Elliotte Harold <elharo AT metalab.unc.edu>
  • To: Steve Loughran <steve.loughran AT gmail.com>
  • Cc: xom-interest <xom-interest AT lists.ibiblio.org>
  • Subject: Re: [XOM-interest] XSD Schema and Validation problems
  • Date: Mon, 19 Dec 2005 09:39:14 -0500

Steve Loughran wrote:

cml0.xml
<c:cml
xmlns:c="http://org.xml-cml.cml/schema";
xsi:schemaLocation="http://org.xml-cml.cml/schema cml0.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>
<c:molecule id="a1"/>
</c:cml>

sometimes xerces doesnt like spaces in filenames. Those schema
locations should not have spaces in, but %20 bits where they go. You
can use File.toURI or something to create valid uris. But personally,
I'd leave them out altogether.

That's not the problem here, though I thought so at first too. Remember the xsi:schemaLocation attribute contains at least too and often more different URLs. In this case, http://org.xml-cml.cml/schema is the namespace URI and cml0.xsd is the relative URL where the schema for that namespace is found. There are two URLs separated by a space here, not one URL that contains a space.

--
Elliotte Rusty Harold elharo AT metalab.unc.edu
XML in a Nutshell 3rd Edition Just Published!
http://www.cafeconleche.org/books/xian3/
http://www.amazon.com/exec/obidos/ISBN=0596007647/cafeaulaitA/ref=nosim




Archive powered by MHonArc 2.6.24.

Top of Page