Documentation Center

xmlattr

Returns xml document metadata and root element of original document.

Description

This function locates the specified resource and returns its metadata and root element of original document in xml form.

Parameters

action
xmlattr
docid
The document id of requested resource.
area
The area of the requested resource e.g. 'live', 'holding'.
resource
The name of the requested resource.
filename
filename of requested resource.
type
type of resource e.g. 'doc', 'toc', 'doctoc'.
lang
A language version of a publication.
pub
A publication, which is a logical grouping of information (topics and multimedia) related to a specific subject, containing one or more language versions.

Example URL

http://<host>:<port>/<context>/web/content.xql?action=xmlattr&docid=<value>&area=<value>&resource=<value>&filename=<value>&type=<value>&lang=<value>&pub=<value>

Successful Result

metadata and root element of original document, or <lc:failedref> if resource does not exist.

Failed Result

404 error if  language version is not visible.

Permission exception if  user does not have 'View source XML' permission.

Permission exception if  resource is in 'holding' area and user does not have 'Manage apps' permission.