|
[XQuery Talk Mailing List Archive Home] [By Date] [By Thread] [By Subject] [By Author] [Recent Entries] [Reply To This Message] RE: What identifies an XML schema in XQuery, target namespace or schema location?Michael Kay mike at saxonica.comMon Jan 14 08:41:41 PST 2008
> So my question is, Which is more reasonable for a general XQuery processor to identify the schema, target namespace or schema location There are a number of reasonable approaches - but the specification deliberately leaves room for implementors to come up with others. One approach is for the system to maintain some kind of catalog of schema documents (perhaps precompiled; perhaps requiring them to be loaded into an XML database), in which a namespace URI is sufficient to identify the schema components relating to that namespace. In this situation it is reasonable to ignore the schema location entirely. Another approach is to rely entirely on the schema location: always load the schema document at that location, and then perform consistency checks against other schema components for the same namespace. A third approach is to start with the namespace, using the existing schema components for that namespace if available, and to use the schema location only if no schema for that namespace has already been loaded. Saxon by default uses the third approach. But the behaviour is controlled using a URIResolver that you override - rather like the Java ClassLoader - it you want to adopt a different strategy. Michael Kay http://www.saxonica.com/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://x-query.com/pipermail/talk/attachments/20080114/de002102/attachment.htm
|
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
|






