[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: forcing SchemaLocation ?
PHDB _ wrote: > I want to manage several versions of my XML Schema, and store the > different version in different folders. > However I don't want that a user can be able to change the > SchemaLocation he is allowed to use. Thus I want to be able able to > force (according to the user) the SchemaLocation before parsing and > validating. > > Is there a simple way to that ? Not in general. XML Schema leaves it open for implementations to locate schemas in any way they wish; schema locations specified in schemas are no more than hints. This means that a parser could override an explicit schema location, or supply a missing one, in some implementation-defined way. You will have to consult your parser documentation for details. The parser I am most familiar with, Xerces J, allows you to supply a single schema location as a property. At a lower level, it allows an application to supply a grammar pool that, properly programmed, can substitute any number of schema locations for existing or missing specifications in the schema. These features are available at the API level. Other parsers probably have similiar capabilities. Bob Foster http://xmlbuddy.com/
|
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
|