sc.attributeDecl( [arg as Item] ) as attributeDecl()?
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. |
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
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.