• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

how to include xsd by specifying relative path in schemaLocation

 
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,
I am using 2 XSD files assume main.xsd and sub.xsd both are located in different folders.
main.xsd include the sub.xsd in following manner by specifying absolute path for attribute schemaLocation:
<xs:include schemaLocation="D:/Applications/XSD/pass/apiRQ.xsd"/>

which works fine for me.

But the problem is that I need to replace absolute path with relative one eg.
<xs:include schemaLocation="../../XSD/pass/apiRQ.xsd"/>
if I specify the relative path as specified above , I get following error :
Failed to read included schema document '../../XSD/pass/apiRQ.xsd'

though it works fine if I keep both the files in same folder and specify the path as follows
<xs:include schemaLocation="apiRQ.xsd"/>

Is there any workaround.

Thanks
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic