Query language

The XMP data model expects a backing file that conforms to the Adobe XMP specification dated June 2005. The XMP backing file is parsed into an XMP-specific document object model. This XMP object model is then queried with an XMP location path (which is a small subset of XPath 1.0). The standard built-in aliases for XMP property names are automatically resolved.

Note:

An XMP packet or file is a subset of RDF serialized to XML. Because a particular RDF construct (and thus an XMP property) can be serialized to XML in various ways, it is virtually impossible to correctly query an XMP file using generic XPath 1.0 expressions.

Namespaces

Namespace prefixes in the XMP location path 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.

The query functions do not provide a separate argument to specify the top-level namespace (also called the "schema namespace" in XMP). This means that all property names in the XMP location path (including the top-level property name) must have a namespace prefix.

The default prefix map for a dataset with this model includes all mappings for the standard XMP namespaces, augmented with any extra mappings that occur in the backing file.