Class TunableParserForXml<D>

java.lang.Object
eu.bandm.tools.rdparser.TunableParser<D>
eu.bandm.tools.rdparser.TunableParserForXml<D>
Direct Known Subclasses:
TunedDTDParser

public abstract class TunableParserForXml<D> extends TunableParser<D>
Parser skeleton which defines the most important character set constants for XML parsing.
  • Field Details

    • versionNumSet

      public static final TunableParser.CharSet versionNumSet
      Chars which can appear in an XML version declaration.
    • asciiLetterSet

      public static final TunableParser.CharSet asciiLetterSet
      The letters in ascii.
    • encNameSet

      public static final TunableParser.CharSet encNameSet
      Chars which can appear in an XML 1.0 encoding name.
    • sSet

      public static final TunableParser.CharSet sSet
      Chars which are the alternatives for XML 1.0 whitespace including the starting character of parameter enttities.
    • sNoPESet

      public static final TunableParser.CharSet sNoPESet
      Chars which are the alternatives for XML whitespace, excluding parameter entities.
    • initialSet

      public static final TunableParser.CharSet initialSet
      Chars which can appear as the initial character of an identifier, as defined by "Name" nonterminal of the XML 1.0 standard.
    • nameSet

      public static final TunableParser.CharSet nameSet
      Chars which can appear as subsequent characters of an identifier, as defined by "Name" nonterminal of the XML 1.0 standard.
    • pubidCharSet

      public static final TunableParser.ExtensionalCharSet pubidCharSet
      Chars which can appear in an XML 1.0 "public identifier".
    • hexDigitSet

      public static final TunableParser.ExtensionalCharSet hexDigitSet
      Hexdecimal digits, in both lower and upper case.
    • decDigitSet

      public static final TunableParser.ExtensionalCharSet decDigitSet
      Decimal digits.
    • prefix_PE

      public static final char prefix_PE
      Prefix for the definition and reference of "parsed entities". To be used in DTD element definitions and INCLUDE/IGNORE switches.
      See Also:
    • prefix_GE

      public static final char prefix_GE
      Prefix for the definition and reference of "general entities". These appear not in the DTD, but in the text body part.
      See Also:
    • stringconstant_INCLUDE

      public static final String stringconstant_INCLUDE
      Evident
      See Also:
    • stringconstant_IGNORE

      public static final String stringconstant_IGNORE
      Evident
      See Also:
  • Constructor Details

    • TunableParserForXml

      protected TunableParserForXml(Reader in, D id, MessageReceiver<? super SimpleMessage<D>> msg)
      Only Constructor.
      Parameters:
      in - source to parse
      id - id of toplevel document, for locations in messages
      msg - message channel
  • Method Details

    • lookahead_pe

      public boolean lookahead_pe()
      Whether the next two characteds are the start of a "parsed entity", that is the prefix char and one character which starts a valid "name".
    • prefixedEntityName

      public static final String prefixedEntityName(String name, boolean parameter)
      Pair of entity name and entiy kind, for use as keys into maps. The disjoint namespaces of PE and GE are realizhed by pre-pending ampersand or percent.