|
[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Problem with relative paths when validating against xsd
So I've got an application that runs inside Weblogic and validates xml against
xml schema thus.
String noNamespaceSchemaLocation = "PricingService/" + commandName +
"Command.xsd";
saxParser.setProperty(
"http://apache.org/xml/properties/schema/external-noNamespaceSchemaLocation",
noNamespaceSchemaLocation);
Now this relative URI is relative to the CWD which is the Weblogic domain
directory.
What I don't understand is why this path is also necessary to validate relative
paths for all the .xsd files that lie in this directory.
So I have Common.xsd, Types.xsd that are under PricingService and are reused in
other .xsds that are also in PricingService but at runtime via <xsd:include
this paths are resolved relative to CWD and not relative to where they are
being included so I'm forced to specify <xs:include
schemaLocation="PricingService/Common.xsd"/> instead of just <xs:include
schemaLocation="Common.xsd"/> and this presents a problem in XMLSpy because
XMLSpy wants to resolve all paths relative to where they are included from not
from any notion of a CWD.
----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|
|||||||||

Cart








