Class StripSpaceRules


  • public class StripSpaceRules
    extends java.lang.Object
    The set of rules used to decide strip-space/preserve-space matching of element names in XSLT.
    Author:
    Michael H. Kay
    • Constructor Summary

      Constructors 
      Constructor Description
      StripSpaceRules()
      Default constructor - creates a StripSpaceRules containing no rules
    • Constructor Detail

      • StripSpaceRules

        public StripSpaceRules()
        Default constructor - creates a StripSpaceRules containing no rules
    • Method Detail

      • addRule

        public void addRule​(NodeTest test,
                            Stripper.StripRuleTarget action,
                            StylesheetModule module,
                            int lineNumber)
        Add a rule
        Parameters:
        test - a NodeTest (*, *:local, prefix:*, or QName)
        action - StripRuleTarget.STRIP or StripRuleTarget.PRESERVE
        module - the stylesheet module containing the rule
      • getRule

        public Rule getRule​(NodeName nodeName)
        Get the rule corresponding to a given element node, by finding the best pattern match.
        Parameters:
        nodeName - the name of the element node to be matched
        Returns:
        the best matching rule, if any (otherwise null).