How to link a local XSD file along a relative path

This is a continuation of How to configure Eclipse to work with `ehcache` , and there is an example of an absolute path in How to refer to a local XML schema file?

Since the file is xsdno longer located, I downloaded a copy of it from the archive. I put the file in my resource directory and would like to link to it in my xsi:schemaLocationrelative path of my project. We have both windows and mac developers, so an absolute path agreement like this file:///c:/project/foowill not work.

Another alternative to the relative path would be if there is a way to refer to system properties for both windows and mac, then I could make 2 entries, for example file:///$HOME/workspace/foo.

My project on my mac exists in ~/workspace/foo, and the echo from $ HOME gives my home path.

Mine spring-cache.xmlexists in./src/main/webapp/WEB-INF/spring/

My ehcache-spring-1.2.xsdexists in./src/main/resources/

Listed below are some of them that I have tried without success:

        file:///$HOME/workspace/foo/src/main/resources/ehcache-spring-1.2.xsd
        file:///./src/main/resources/ehcache-spring-1.2.xsd             
        file:///../../../../resources/ehcache-spring-1.2.xsd
        file:///../../../../resources/ehcache-spring-1.2.xsd
        ../../../../resources/ehcache-spring-1.2.xsd
        file://../../../../resources/ehcache-spring-1.2.xsd
        file://$HOME/workspace/foo/src/main/resources/ehcache-spring-1.2.xsd
        file://./src/main/resources/ehcache-spring-1.2.xsd              
        file://../../../../resources/ehcache-spring-1.2.xsd

I am also having trouble linking to the file from an absolute path, so maybe there is another way to link to the file on mac? For example, the following actions were not performed:

file:///Users/me/workspace/foo/src/main/resources/ehcache-spring-1.2.xsd
file:////Users/me/workspace/foo/src/main/resources/ehcache-spring-1.2.xsd
file://Users/me/workspace/foo/src/main/resources/ehcache-spring-1.2.xsd
+2
source share
1 answer

Think my problem is that in the webapp directory there is no visibility in the resource folder.

, , , , : XML XML- XML

, - , :

../../../../resources/ehcache-spring-1.2.xsd
../../../resources/ehcache-spring-1.2.xsd
../../resources/ehcache-spring-1.2.xsd
../resources/ehcache-spring-1.2.xsd
./resources/ehcache-spring-1.2.xsd
../ehcache-spring-1.2.xsd
./ehcache-spring-1.2.xsd

:

, xsd ./src/main/resources/ ./src/main/webapp/WEB-INF/spring/, ehcache-spring-1.2.xsd

+1

All Articles