setContextNodeIdToFirstMatchingNodeFromContextNode

Type: Transform step

Deprecated!

This is deprecated.

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

This transform is deprecated. Use inline XPath in operations instead.

Instead of:

JSON

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

Use:

JSON

"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