Comment 3 for bug 1192043

Revision history for this message
Chris Hillery (ceejatec) wrote :

Exploration indicates that the current lookup process does exhaust filesystem locations before trying network.

After some consideration, I have left the mechanism effectively unchanged. The only modification was to change the extension that modules/schemas use on URI_PATH to .module/.schema, rather than .xq/.xsd. This is basically a clarification that a Zorba module or schema may be written in several languages, not just XQuery/XML Schema.

The downsides of installing files with "correct" extensions (eg., .xq/.jq/.xsd/.jsd) is that it requires additional filesystem lookups, and more network attempts if it is not found locally. By using a single extension, we can support an arbitrary number of languages without increasing the number of stats.

Also, for modules, it is not clear how to achieve the suggested goal of feeding the file extension back to translator so it can use the "right parser". The better approach for that issue is to ensure that all Zorba modules have a correct version declaration on the front line; I am adding code for that. There is no equivalent way to ensure schemas have a correct form, but unlike modules we use different mechanisms for loading JSound and XSD schemas.