Patrick TJ McPhee
Usenet Archive
- Joined
- Apr 2, 2000
- Messages
- 269
- Reaction score
- 0
[...]
% document(concat(@base,'.xml')) (*)
%
% will be interpreted (by W3C compliant xslt processors) as % document('/some/path/file.xml') because the result of concat % is a string and not a node-set. This is the case of Gnome's xsltproc, % the processor I am currently using. This is not the case of Xalan, % since this processor silently interprets (*) as document("file.xml").
More precisely, the first argument is treated as a URI. I'm not sure how much leeway there is in interpreting URIs which don't include the protocol, but it seems like Xalan is treating this as a relative URI, while libxslt is treating it as if it were file:///some/path/file.xml. If there's no second argument and the first argument is a string, document resolves relative URIs against the location of the stylesheet.
You could try changing the concatenation to put file:// at the front if you know that the resulting URI is always going to be a file.
% document(concat(@base,'.xml')) (*)
%
% will be interpreted (by W3C compliant xslt processors) as % document('/some/path/file.xml') because the result of concat % is a string and not a node-set. This is the case of Gnome's xsltproc, % the processor I am currently using. This is not the case of Xalan, % since this processor silently interprets (*) as document("file.xml").
More precisely, the first argument is treated as a URI. I'm not sure how much leeway there is in interpreting URIs which don't include the protocol, but it seems like Xalan is treating this as a relative URI, while libxslt is treating it as if it were file:///some/path/file.xml. If there's no second argument and the first argument is a string, document resolves relative URIs against the location of the stylesheet.
You could try changing the concatenation to put file:// at the front if you know that the resulting URI is always going to be a file.