Loading TOC...

sc.attributeDecl

sc.attributeDecl(
   [$arg as String]
) 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

Comments

    Powered by MarkLogic Server 7.0-4.1 and rundmc | Terms of Use | Privacy Policy