setContextNodeIdToFirstMatchingNodeFromContextNode

Type: Transform step

Set contextNodeId to the nodeId of the first match of the XPath evaluated from the original context node.

Other

"contextual-remove-title": {
  "label": "Remove title",
  "steps": [
    {
      "type": "transform/setContextNodeIdToFirstMatchingNodeFromContextNode",
      "data": {
        "contextNodeId": "{{contextNodeId}}",
        "xPathQuery": "./title"
      }
    },
    {
      "type": "operation/delete-node",
      "data": {
        "contextNodeId": "{{contextNodeId}}"
      }
    }
  ]
}

Note that the inline-xpath-in-operations syntax can also be used to achieve the same goal:

Other

"contextual-remove-title": {
  "label": "Remove title",
  "steps": [
    {
      "type": "operation/delete-node",
      "data": {
        "contextNodeId": "x__$data('contextNode')/title"
      }
    }
  ]
}

Imported operation data

  1. contextNodeId

    Type: NodeId

    The nodeId of the node to start the query from

  2. xPathQuery

    Type: Stencil

    Stencil containing one or more gaps representing the locations from which to set the values of the model.

Exported operation data

  1. contextNodeId

    Type: NodeId