setContextNodeIdToSelectionCommonAncestorElement

Type: Transform step

Deprecated!

This is deprecated.

Set the contextNodeId stepData property to the common ancestor container of the selection. If the common ancestor is not an element, the contextNodeId property is set to the parentNode of that node.

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

Instead of:

JSON

"do-something-non-contextual": {
  "label": "Do Something non contextual(r)",
   "steps": [
     {
       "type": "transform/setContextNodeIdToSelectionCommonAncestorElement"
     },
     {
       "type": "operations/do-something-contextual"
     }
   ]
}

Use:

JSON

"do-something-non-contextual": {
  "label": "Do Something non contextual(r)",
  "steps": [
    {
      "type": "operations/do-something-contextual",
      "data": {
        "contextNodeId": "x__fonto:selection-common-ancestor()/(self::*, parent::*)[1]"
      }
    }
  ]
}