ref:: Axisref:: Axis
STM by Example
Home > Books > Tutorials and Training Guides > STM Language > ref:: Axis

Rate this page:
Really useful
Satisfactory
Not helpful
Confusing
Incorrect
Unsure
Extra comments:


The ref:: axis is an addition xpath axis that can be specified on any STM instruction that has an xpath attribute. It provides a level of indirection, allowing the xpath used by the instruction to be obtained dynamically from the body of the instruction.

Example

This example deletes all elements in the operand document of the path /entrypoints/entrypoint filtered by a given Predicate obtained from the text at the path /nvp/xpath in the parameter document.

<stm:group xmlns:stm="http://1060.org/stm">
  <stm:delete xpath="ref::xpath">
    <xpath>/entrypoints/entrypoint[
      <stm:param xpath="/nvp/xpath/text()" />]
    </xpath>
  </stm:delete>
</stm:group>


(C) 2003, 1060 Research Limited
© 2003-2007, 1060 Research Limited. 1060 registered trademark, NetKernel trademark of 1060 Research Limited.