W3C home > Mailing lists > Public > www-xml-schema-comments@w3.org > July to September 2001

Re: Relative path in Include Element

From: <NJayaraman@tomax.com>
Date: Thu, 20 Sep 2001 08:41:47 -0600
To: ht@cogsci.ed.ac.uk (Henry S. Thompson)
Cc: "xmlschema-dev@w3.org" <xmlschema-dev@w3.org>, www-xml-schema-comments@w3.org
Message-ID: <OF5B2C0731.9B0DDBCB-ON87256ACD.00508A0E@tomax.com>

Hi Henry,

     I am using Xerces parser for Java 1.4.3. I have Xml and XSD files in
one directory, say d:\xml. And I have my parser java code in another
directory say d:\beantest. In Xml instance document I have mentioned XSD
file with noNamespaceSchemaLocation="d:\xml\test.xsd" and in test.xsd file
I have
<xsd:include schemaLocation="schema_lib.xsd"/>. When I run java code from
d:\beantest\, it says

[Warning] :0:0: File "file:///D:/beantest/schema_lib.xsd" not found.

Could please throw some light on this?

Thanks !!

                    c.uk (Henry S.       To:     NJayaraman@tomax.com                                              
                    Thompson)            cc:     "xmlschema-dev@w3.org" <xmlschema-dev@w3.org>,                    
                    09/20/01 03:29       Subject:     Re: Relative path in Include Element                         

NJayaraman@tomax.com writes:

> Hi,
>      I would like to know how to specify relative path name when
> other schema definitions. For eg.
>      <?xml version="1.0" encoding="UTF-8"?>
>      <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>      <xsd:include schemaLocation="tmx_schema_lib.xsd"/>

The URL of the schema document should be used as the base for relative
URLs in the schemaLocation attributes of xs:include and xs:import, in
my opinion, although I don't _think_ the REC says anything about this.

Similarly, the URL of the target document should be used as the base
for relative URLs in the xsi:schemaLocation and
xsi:noNamespaceSchemaLocation attributes.

XSV behaves according to those principles.

Which validator are you using?

  Henry S. Thompson, HCRC Language Technology Group, University of
          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@cogsci.ed.ac.uk
                          URL: http://www.ltg.ed.ac.uk/~ht/
Received on Thursday, 20 September 2001 10:41:36 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:08:53 UTC