Class MarkupXHTMLIn


  • public class MarkupXHTMLIn
    extends MarkupEngineIn
    This class is the XHTML input markup engine. To use it, one creates an instance, passing the string to be translated in a constructor parameter. Then the engine is passed to a Markup() method on either a text stream or range.

    For more information, please see the extenral documentation.

    • Constructor Detail

      • MarkupXHTMLIn

        public MarkupXHTMLIn​(java.lang.String oMarkupSource,
                             MarkupAttr pMarkupAttr,
                             TextAttr poAmbientAttr,
                             TextResolver poResolver)
        Constructor.
        Parameters:
        oMarkupSource - - XHTML markup to be processed.
        pMarkupAttr - - (optional) Markup attribute table to use for the translation. It is strongly recommended that you pass a NULL pointer (default).
        poAmbientAttr - - (optional) Overall text attribute settings, for those not specified in the markup. NULL (default) establishes no overall attributes.
        poResolver - - Callback interface for embedded field references.
    • Method Detail

      • translate

        public void translate()
        Translate the XHTML markup.

        This is not normally called by the creator of the XHTML markup engine. Instead, the engine is passed to a text stream or range in a Markup() method that makes the call.

        Overrides:
        translate in class MarkupEngineIn
      • tabDefault

        public static void tabDefault​(java.lang.String sAttrValue,
                                      TextAttr oAttr,
                                      MarkupAttr pMarkupAttr)
        Set the default tab increment.

        NOTE: As a static method, there may be multithreading issues.

        Parameters:
        sAttrValue - - a unit span value for a left tab.
        oAttr - - the text attribute to be modified
        pMarkupAttr - - the table of markup strings to be used for unit conversion.
      • tabSet

        public static void tabSet​(java.lang.String sAttrValue,
                                  TextAttr oAttr,
                                  MarkupAttr pMarkupAttr)
        Set the tab stops.

        NOTE: As a static method, there may be multithreading issues. Tab types can be decimal, left, right and center.
        Example:
        "decimal 2cm left 5cm" specifies two tabs.

        Parameters:
        sAttrValue - - a collection of tab types and unitspans.
        oAttr - - the text attribute to be modified
        pMarkupAttr - - the table of markup strings to be used for unit conversion and looking up tab types.
      • defaultTypeface

        public java.lang.String defaultTypeface()
      • skipThisCommand

        public boolean skipThisCommand​(int eTag)
      • getAttr

        public java.lang.String getAttr​(org.xml.sax.Attributes attrlist,
                                        int eTag)
      • getAttr

        public java.lang.String getAttr​(org.xml.sax.Attributes attrlist,
                                        java.lang.String sName)
      • text

        public void text​(java.lang.String sText)