
admin.databaseElementAttributeReference( scalar-type as String, parent-namespace as String?, parent-localname as String, namespace as String?, localname as String, collation as String? ) as element(db.elementAttributeReference)
This function greated a db:element-attribute-reference specification.
const admin = require('/MarkLogic/admin.xqy');
admin.databaseElementAttributeReference("int", "", "elementName", "",
"attributeName", "")
=>
<elementAttributeReference xmlns="http://marklogic.com/xdmp/database">
<scalarType>int</scalarType>
<parentNamespaceUri/>
<parentLocalname>elementName</parentLocalname>
<namespaceUri/>
<localname>attributeName</localname>
<collation/>
</elementAttributeReference>
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.