Loading TOC...

MarkLogic 12 EA 2 Product Documentation
admin:database-element-reference

admin:database-element-reference(
   $scalar-type as xs:string,
   $namespace as xs:string?,
   $localname as xs:string,
   $collation as xs:string?
) as element(db:element-reference)

Summary

This function greated a db:element-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.
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



xquery version "1.0-ml";

import module namespace admin = "http://marklogic.com/xdmp/admin"
      at "/MarkLogic/admin.xqy";

admin:database-element-reference("int", "", "element-name", "")
=>
<element-reference xmlns="http://marklogic.com/xdmp/database">
	<scalar-type>int</scalar-type>
	<namespace-uri/>
	<localname>element-name</localname>
	<collation/>
</element-reference>

Stack Overflow iconStack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.