MarkLogic 10 Product Documentation
admin.databaseElementAttributeReference

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)

Summary

This function greated a db:element-attribute-reference specification.

Parameters
scalar-type A valid type for the range index. Must be one of: int, unsignedInt, long, unsignedLong, float, double, decimal, dateTime, time, date, gYearMonth, gYear, gMonth, gDay, yearMonthDuration, dayTimeDuration, string, anyURI, or point.
parent-namespace The namespace URI for the attribute's parent element. Specify an empty string if the element is in no namespace.
parent-localname The local name for attribute's parent element.
namespace The namespace URI. Specify an empty string if the element is in no namespace.
localname The local name for the node.
collation The collation URI (for example, http://marklogic.com/collation/). The collation is only needed for string and anyURI indexes; for other indexes, specify the empty string ("") for this parameter.

Example

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>
Powered by MarkLogic Server | Terms of Use | Privacy Policy