[xquery-talk] prolog ordering
Dave Pawson
dave.pawson at gmail.com
Fri Nov 18 10:30:53 PST 2005
http://www.w3.org/TR/xquery/#prod-xquery-Prolog
shows
[6] Prolog ::= (
(DefaultNamespaceDecl | Setter | NamespaceDecl | Import)
Separator)*
(
(VarDecl | FunctionDecl | OptionDecl)
Separator)*
(I think there is a paren mismatch btw)
declare boundary-space preserve;
declare default element namespace "";
declare base-uri "file:///myjava/xquery/data/";
(: seemingly relative to xml:base :)
import module namespace dp = "urn:modul" at "modul.xq";
Using Saxon 8 shows the error
Error on line 5 column 1 of file:/C:/myjava/xquery/data/test10.xq:
XPST0003: XQuery syntax error in #... "file:///myjava/xquery/data/"#:
'declare base-uri' must appear earlier in the query prolog
Failed to compile query
If I read the spec right (not a common case), then
expanding the first group, setters, shows
(DefaultNamespaceDecl
BoundarySpaceDecl
DefaultCollationDecl
BaseURIDecl
ConstructionDecl
OrderingModeDecl
EmptyOrderDecl
CopyNamespacesDecl
NamespaceDecl
Import) Separator )*
in which case the elements can appear in any order?
regards
--
Dave Pawson
XSLT XSL-FO FAQ.
http://www.dpawson.co.uk
More information about the talk
mailing list