Win a copy of Succeeding with AI this week in the Artificial Intelligence and Machine Learning forum!
    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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
  • Junilu Lacar
Sheriffs:
  • Tim Cooke
  • Jeanne Boyarsky
  • Knute Snortum
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:
  • salvin francis
  • fred rosenberger
  • Frits Walraven

how to include xsd by specifying relative path in schemaLocation

 
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • 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
  • 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.
 
Forget Steve. Look at this tiny ad:
Two software engineers solve most of the world's problems in one K&R sized book
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic