This function constructs an included element specification.
Parameters
namespace
The namespace URI. Specify an empty string if the
element is in no namespace.
localname
The local name for the node.
weight
The query weight to use in relevance calculations.
attribute-namespace
The namespace for the attribute to constrain on. Specify an
empty string if there is no attribute to constrain on or if the
attribute is in no namespace.
attribute-localname
The local name of the attribute to constrain on. Specify an
empty string if there is no attribute to constrain on.
attribute-value
The value for the attribute to constrain on (only attributes with
this value). Specify an empty string if there is no attribute
to constrain on.
Example
xquery version "1.0-ml";
import module namespace admin = "http://marklogic.com/xdmp/admin"
at "/MarkLogic/admin.xqy";
admin:database-included-element("http://myuri/namespace",
"element-name", 1.0, "", "myAttribute", "some value")
(: the constructed element :)
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.