[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Problem with relative paths when validating against xsd

  • To: xml-dev@l...
  • Subject: Problem with relative paths when validating against xsd
  • From: robert@e...
  • Date: Tue, 30 Aug 2005 10:37:24 -0500
  • User-agent: Internet Messaging Program (IMP) 3.2.2

nonamespaceschemalocation relative path
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!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.