sc.attributeDecl

sc.attributeDecl(
   [arg as Item]
) as attributeDecl()?

Summary

Returns the attribute declaration of item, as a schema component, if any. If the item has no attribute declaration, the empty sequence is returned. The context item is used if no argument is given.

Parameters
arg The item whose attribute declaration is to be returned.

Example

var th = fn.head(xdmp.unquote('<html xmlns="http://www.w3.org/1999/xhtml">'
+'    <head><title>Example</title></head>'
+'    <body><p class="example">Example</p></body>'
+'  </html>')).root;
sc.attributeDecl(th.xpath("//xh:p/@class", {xh: "http://www.w3.org/1999/xhtml"} ));
=>
@class
Powered by MarkLogic Server | Terms of Use | Privacy Policy