Class XSLCharacterMap

All Implemented Interfaces:
Source, SourceLocator, ActiveSource, GroundedValue, Item, MutableNodeInfo, NamespaceResolver, NodeInfo, Sequence, Location, SteppingNode, SiblingCountingNode, Locator

public class XSLCharacterMap extends StyleElement
An xsl:character-map declaration in the stylesheet.
  • Constructor Details

    • XSLCharacterMap

      public XSLCharacterMap()
  • Method Details

    • isDeclaration

      public boolean isDeclaration()
      Ask whether this node is a declaration, that is, a permitted child of xsl:stylesheet (including xsl:include and xsl:import).
      Overrides:
      isDeclaration in class StyleElement
      Returns:
      true for this element
    • getCharacterMapName

      public StructuredQName getCharacterMapName()
      Get the fingerprint of the name of this character map
      Returns:
      the fingerprint value
    • isRedundant

      public boolean isRedundant()
      Test whether this character map is redundant (because another with the same name has higher import precedence). Note that a character map is not considered redundant simply because it is not referenced in an xsl:output declaration; we allow character-maps to be selected at run-time using the setOutputProperty() API.
      Returns:
      true if this character map is redundant
    • prepareAttributes

      protected void prepareAttributes()
      Validate the attributes on this instruction
      Specified by:
      prepareAttributes in class StyleElement
    • validate

      public void validate(ComponentDeclaration decl) throws XPathException
      Description copied from class: StyleElement
      Check that the stylesheet element is valid. This is called once for each element, after the entire tree has been built. As well as validation, it can perform first-time initialisation. The default implementation does nothing; it is normally overriden in subclasses.
      Overrides:
      validate in class StyleElement
      Parameters:
      decl - the declaration to be validated
      Throws:
      XPathException - if any error is found during validation
    • assemble

      public void assemble(IntHashMap<String> map)
      Assemble all the mappings defined by this character map, adding them to a HashMap that maps integer codepoints to strings
      Parameters:
      map - an IntHash map populated with the character mappings
    • compileDeclaration

      public void compileDeclaration(Compilation compilation, ComponentDeclaration decl) throws XPathException
      Description copied from class: StyleElement
      Compile a declaration in the stylesheet tree for use at run-time.
      Overrides:
      compileDeclaration in class StyleElement
      Parameters:
      compilation - the compilation episode
      decl - the containing top-level declaration, for example xsl:function or xsl:template
      Throws:
      XPathException - if compilation fails