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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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:
  • 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
 
author
Posts: 11962
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
Closing this topic as a duplicate for this.

Please do NOT cross-post the same question to several forums. It's against the common netiquette.
 
Climb the rope! CLIMB THE ROPE! You too tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
    Bookmark Topic Watch Topic
  • New Topic