Interface: XQueryDataAdapter<NodeType>
Defined in: lang-xquery/src/language/data-adapter.ts:9
Data adapter for the XQuery language.
Type Parameters
| Type Parameter | Default type |
|---|---|
NodeType | any |
Methods
addAttribute()
addAttribute(
el,attr):void
Defined in: lang-xquery/src/language/data-adapter.ts:70
Add an attribute to an element.
Parameters
| Parameter | Type | Description |
|---|---|---|
el | NodeType | The element to add the attribute to. |
attr | NodeType | The attribute to add. |
Returns
void
atomize()
atomize(
value):unknown
Defined in: lang-xquery/src/language/data-adapter.ts:87
Atomize a value.
Parameters
| Parameter | Type | Description |
|---|---|---|
value | unknown | The value to atomize. |
Returns
unknown
cloneNode()
cloneNode(
node):NodeType
Defined in: lang-xquery/src/language/data-adapter.ts:14
Create deep copy of a node.
Parameters
| Parameter | Type |
|---|---|
node | NodeType |
Returns
NodeType
createAttribute()
createAttribute(
ns,qname,content):NodeType
Defined in: lang-xquery/src/language/data-adapter.ts:35
Create an attribute node.
Parameters
| Parameter | Type | Description |
|---|---|---|
ns | string | The namespace URI. |
qname | string | The attribute name. |
content | string | The attribute value. |
Returns
NodeType
createComment()
createComment(
content):NodeType
Defined in: lang-xquery/src/language/data-adapter.ts:40
Create a comment node.
Parameters
| Parameter | Type | Description |
|---|---|---|
content | string | The comment content. |
Returns
NodeType
createDocument()
createDocument(
ns,qname,content):NodeType
Defined in: lang-xquery/src/language/data-adapter.ts:47
Create a document node.
Parameters
| Parameter | Type | Description |
|---|---|---|
ns | string | The namespace URI. |
qname | string | The document name. |
content | unknown[] | The child nodes. |
Returns
NodeType
createElement()
createElement(
ns,qname,content):NodeType
Defined in: lang-xquery/src/language/data-adapter.ts:28
Create an element node.
Parameters
| Parameter | Type | Description |
|---|---|---|
ns | string | The namespace URI. |
qname | string | The element name. |
content | unknown[] | The child nodes. |
Returns
NodeType
createNS()
createNS(
name,content):NodeType
Defined in: lang-xquery/src/language/data-adapter.ts:53
Create a namespace node.
Parameters
| Parameter | Type | Description |
|---|---|---|
name | string | The namespace prefix. |
content | string | The namespace URI. |
Returns
NodeType
createProcInstr()
createProcInstr(
name,content):NodeType
Defined in: lang-xquery/src/language/data-adapter.ts:64
Create a processing instruction node.
Parameters
| Parameter | Type | Description |
|---|---|---|
name | string | The processing instruction name. |
content | string | The processing instruction content. |
Returns
NodeType
createText()
createText(
content):NodeType
Defined in: lang-xquery/src/language/data-adapter.ts:58
Create a text node.
Parameters
| Parameter | Type | Description |
|---|---|---|
content | string | The text content. |
Returns
NodeType
isNode()
isNode(
node):node is NodeType
Defined in: lang-xquery/src/language/data-adapter.ts:11
Is the value a Node?
Parameters
| Parameter | Type |
|---|---|
node | unknown |
Returns
node is NodeType
lookupNSUri()
lookupNSUri(
el,prefix):string
Defined in: lang-xquery/src/language/data-adapter.ts:82
Lookup the namespace URI for a given element.
Parameters
| Parameter | Type | Description |
|---|---|---|
el | NodeType | The element to look up the URI for. |
prefix | string | The namespace prefix. |
Returns
string
lookupPrefix()
lookupPrefix(
el,ns):string
Defined in: lang-xquery/src/language/data-adapter.ts:76
Lookup the namespace prefix for a given element.
Parameters
| Parameter | Type | Description |
|---|---|---|
el | NodeType | The element to look up the prefix for. |
ns | string | The namespace URI. |
Returns
string
treeStep()
treeStep(
test,axis): (node) =>NodeType[]
Defined in: lang-xquery/src/language/data-adapter.ts:21
Create an XPath step function.
Parameters
| Parameter | Type | Description |
|---|---|---|
test | ASTItemType | The item test to apply. |
axis | AxisType | The axis to use. |
Returns
(node) => NodeType[]