Class Xhtml5Sink

    • Field Detail

      • encoding

        private java.lang.String encoding
      • languageId

        private java.lang.String languageId
      • headTitleFlag

        private boolean headTitleFlag
        An indication on if we're inside a head title.
    • Constructor Detail

      • Xhtml5Sink

        protected Xhtml5Sink​(java.io.Writer writer)
        Constructor, initialize the Writer.
        Parameters:
        writer - not null writer to write the result.
      • Xhtml5Sink

        protected Xhtml5Sink​(java.io.Writer writer,
                             java.lang.String encoding)
        Constructor, initialize the Writer and tells which encoding is used.
        Parameters:
        writer - not null writer to write the result.
        encoding - the encoding used, that should be written to the generated HTML content if not null.
      • Xhtml5Sink

        protected Xhtml5Sink​(java.io.Writer writer,
                             java.lang.String encoding,
                             java.lang.String languageId)
        Constructor, initialize the Writer and tells which encoding and languageId are used.
        Parameters:
        writer - not null writer to write the result.
        encoding - the encoding used, that should be written to the generated HTML content if not null.
        languageId - language identifier for the root element as defined by IETF BCP 47, Tags for the Identification of Languages; in addition, the empty string may be specified.
    • Method Detail

      • head

        public void head​(SinkEventAttributes attributes)
        Description copied from class: SinkAdapter
        Starts the head element.

        This contains information about the current document, (eg its title) that is not considered document content. The head element is optional but if it exists, it has to be unique within a sequence of Sink events that produces one output document, and it has to come before the Sink.body(SinkEventAttributes) element.

        The canonical sequence of events for the head element is:

           sink.head();
        
           sink.title();
           sink.text("Title");
           sink.title_();
        
           sink.author();
           sink.text("Author");
           sink.author_();
        
           sink.date();
           sink.text("Date");
           sink.date_();
        
           sink.head_();
         

        but none of the enclosed events is required. However, if they exist they have to occur in the order shown, and the title() and date() events have to be unique (author() events may occur any number of times).

        Supported attributes are:

        PROFILE, LANG.
        Specified by:
        head in interface Sink
        Overrides:
        head in class SinkAdapter
        Parameters:
        attributes - A set of SinkEventAttributes, may be null.
      • head_

        public void head_()
        Ends the head element.
        Specified by:
        head_ in interface Sink
        Overrides:
        head_ in class SinkAdapter
      • title_

        public void title_()
        Ends the title element.
        Specified by:
        title_ in interface Sink
        Overrides:
        title_ in class SinkAdapter
        See Also:
        HTML.Tag.TITLE
      • author_

        public void author_()
        Ends an author element.
        Specified by:
        author_ in interface Sink
        Overrides:
        author_ in class SinkAdapter
        See Also:
        HTML.Tag.META
      • date_

        public void date_()
        Ends the date element.
        Specified by:
        date_ in interface Sink
        Overrides:
        date_ in class SinkAdapter
        See Also:
        HTML.Tag.META
      • body_

        public void body_()
        Ends the body element.
        Specified by:
        body_ in interface Sink
        Overrides:
        body_ in class SinkAdapter
        See Also:
        HTML.Tag.BODY, HTML.Tag.HTML
      • setHeadTitleFlag

        protected void setHeadTitleFlag​(boolean headTitleFlag)

        Setter for the field headTitleFlag.

        Parameters:
        headTitleFlag - an header title flag.
        Since:
        1.1
      • isHeadTitleFlag

        protected boolean isHeadTitleFlag()

        isHeadTitleFlag.

        Returns:
        the current headTitleFlag.
        Since:
        1.1