Class SymbolsReplacer


  • public class SymbolsReplacer
    extends Object
    Replace symbols in a DTBook and insert a symbols list Based on W3C DOM
    Author:
    Paul Rambags
    • Constructor Detail

      • SymbolsReplacer

        public SymbolsReplacer​(net.sf.saxon.s9api.XdmNode symbolsCodeNode)
        Constructor
        Parameters:
        symbolsCodeNode - root document of the symbols code XML
    • Method Detail

      • getSymbolsListReplaces

        protected Set<Replace> getSymbolsListReplaces()
        Get the set of replaces for the symbol list of this DTBook
        Returns:
        set of replaces
      • replaceSymbols

        public void replaceSymbols​(Node node)
        Recursively replace all symbols in text nodes with their braille representation
        Parameters:
        node - DTBook node
      • insertSymbolsList

        public void insertSymbolsList​(Document document,
                                      String header)
        Inserts the symbols list in a DTBook
        Parameters:
        document - DTBook
        header - symbols list header