Understanding SLAX Default Namespaces
Version 1.2 of the SLAX language, which is supported in Junos OS Release 14.2 and later releases, introduces default namespaces for prefixes. Table 1 lists the prefixes that have default namespaces installed with the libslax software distribution.
When a prefix is used without the corresponding ns
statement in scope, SLAX refers to the set of default
namespaces. If the prefix has a default namespace, that namespace
is automatically mapped to the prefix.
Prefix |
Source |
Default URI |
---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
When using the slaxproc tool with
the --format
or --slax-to-xslt
command-line
options, the namespace is properly displayed, as shown in the following
example:
% cat /tmp/foo.slax version 1.1; match / { <top> { expr date:time(); } }
% slaxproc --format /tmp/foo.slax version 1.1; ns date extension = "http://exslt.org/dates-and-times"; match / { <top> date:time(); }