admin:database-field-reference( $scalar-type as xs:string, $fieldname as xs:string, $collation as xs:string? ) as element(db:field-reference)
This function creates a db:field-reference specification.
xquery version "1.0-ml"; import module namespace admin = "http://marklogic.com/xdmp/admin" at "/MarkLogic/admin.xqy"; admin:database-field-reference("int", "my-integer-field", "") => <field-reference xmlns="http://marklogic.com/xdmp/database"> <scalar-type>int</scalar-type> <field-name>my-integer-field</field-name> <collation/> </field-reference>