Package net.sf.saxon.trans.rules

## Class TextOnlyCopyRuleSet

- java.lang.Object
- - net.sf.saxon.trans.rules.TextOnlyCopyRuleSet

- All Implemented Interfaces:
    `ContextOriginator`, `BuiltInRuleSet`

      public class TextOnlyCopyRuleSet
      extends java.lang.Object
      implements BuiltInRuleSet

  The built-in rule set used for 1.0 and 2.0, which for document and element nodes does an apply-templates to children, and for text nodes and attribute nodes copies the node.

- - ### Field Summary

    - ### Fields inherited from interface net.sf.saxon.trans.rules.BuiltInRuleSet

      `APPLY_TEMPLATES_TO_ATTRIBUTES, APPLY_TEMPLATES_TO_CHILDREN, DEEP_COPY, DEEP_SKIP, FAIL, SHALLOW_COPY`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `int[]` | `getActionForParentNodes​(int nodeKind)` | Get the default action for unmatched nodes
    `static TextOnlyCopyRuleSet` | `getInstance()` | Get the singleton instance of this class
    `java.lang.String` | `getName()` | Identify this built-in rule set
    `void` | `process​(Item item, ParameterSet parameters, ParameterSet tunnelParams, Outputter output, XPathContext context, Location locationId)` | Perform the built-in template action for a given item.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### getInstance

          public static TextOnlyCopyRuleSet getInstance()

      Get the singleton instance of this class
      Returns:
        the singleton instance

    - #### process

          public void process​(Item item,
                              ParameterSet parameters,
                              ParameterSet tunnelParams,
                              Outputter output,
                              XPathContext context,
                              Location locationId)
                       throws XPathException

      Perform the built-in template action for a given item.
      Specified by:
        `process` in interface `BuiltInRuleSet`
      Parameters:
        `item` - the item to be processed
        `parameters` - the parameters supplied to apply-templates
        `tunnelParams` - the tunnel parameters to be passed through
        `output` - the destination for the result
        `context` - the dynamic evaluation context
        `locationId` - location of the instruction (apply-templates, apply-imports etc) that caused the built-in template to be invoked
      Throws:
        `XPathException` - if any dynamic error occurs

    - #### getName

          public java.lang.String getName()

      Identify this built-in rule set
      Specified by:
        `getName` in interface `BuiltInRuleSet`
      Returns:
        "text-only"

    - #### getActionForParentNodes

          public int[] getActionForParentNodes​(int nodeKind)

      Get the default action for unmatched nodes
      Specified by:
        `getActionForParentNodes` in interface `BuiltInRuleSet`
      Parameters:
        `nodeKind` - the node kind
      Returns:
        the default action for unmatched nodes: one of DEEP_COPY, SHALLOW_SKIP, DEEP_SKIP, FAIL, etc