Specifications
Creating prefix maps
Returns a new empty prefix map object.
createEmptyMap(
) : Map
Returns a new prefix map object that already contains all mappings that
occur in the backing file. For an Opaque dataset this function returns an
empty prefix map object.
createDefaultMap(
) : Map
For XML and JDF datasets, the default namespace (if any) is included in the
default map with one or more special prefixes. This allows XPath queries to
refer to the default namespace using these special prefixes. (XPath does not
support the default namespace concept, so you always have to explicitly
provide a namespace prefix).
The following table summarizes the contents of the default map for each
data model.
Namespace prefixes defined
in the backing file
Default namespace
defined in backing file
Data model
Included in default map using
the prefix specified in
xmlns:<prefix> attribute
Included in default map
with special prefixes
“default_switch_ns” and
“dn” unless these prefixes
XML
are otherwise defined in
the file
Included in default map
with special prefix “jdf”
JDF
unless this prefix is
otherwise defined in the
file
Not applicableXMP
Not applicableNot applicableOpaque
XML data model
The XML data model describes a class that inherits all functions described in the Dataset class.
Query language
The XML data model expects a well-formed XML backing file ( refer to the XML 1.0 specification),
which is parsed with support for namespaces into an XML document object model (DOM). The
object model is then queried with an XPath 1.0 expression using the root node as the context
node.
Namespaces
Namespace prefixes in the query expression are resolved into namespace URIs using the prefix
map provided to the query functions as a second argument. If the map argument is omitted or
null, the default prefix map is used for resolving prefixes.
478
Enfocus Switch 10










