Class XhtmlNamespaceHandler

  • All Implemented Interfaces:
    NamespaceHandler

    public class XhtmlNamespaceHandler
    extends XhtmlCssOnlyNamespaceHandler
    Handles xhtml documents, including presentational html attributes (see css 2.1 spec, 6.4.4). In this class ONLY handling (css equivalents) of presentational properties (according to css 2.1 spec, section 6.4.4) should be specified.
    • Field Detail

      • DEFAULT_SVG_DIMS

        private static final java.lang.String DEFAULT_SVG_DIMS
        See Also:
        Constant Field Values
    • Constructor Detail

      • XhtmlNamespaceHandler

        public XhtmlNamespaceHandler()
    • Method Detail

      • isFormElement

        public boolean isFormElement​(org.w3c.dom.Element e)
        Determines whether or not the specified Element represents a <form>.
        Specified by:
        isFormElement in interface NamespaceHandler
        Overrides:
        isFormElement in class NoNamespaceHandler
        Parameters:
        e - The Element to evaluate.
        Returns:
        true if the Element is a <form> element, false otherwise.
      • getImageSourceURI

        public java.lang.String getImageSourceURI​(org.w3c.dom.Element e)
        Description copied from interface: NamespaceHandler
        For an element where isImageElement returns true, retrieves the URI associated with that Image, as reported by the element; makes no guarrantee that the URI is correct, complete or points to anything in particular. For elements where NamespaceHandler.isImageElement(org.w3c.dom.Element) returns false, this method may return false, and may also return false if the Element is not correctly formed and contains no URI; check the return value carefully.
        Specified by:
        getImageSourceURI in interface NamespaceHandler
        Overrides:
        getImageSourceURI in class NoNamespaceHandler
        Parameters:
        e - The element to extract image info from.
        Returns:
        String containing the URI for the image.
      • applySvgStyles

        private java.lang.String applySvgStyles​(org.w3c.dom.Element e)
      • applyInputStyles

        private java.lang.String applyInputStyles​(org.w3c.dom.Element e)
      • applyTextareaStyles

        private java.lang.String applyTextareaStyles​(org.w3c.dom.Element e)
      • applyBlockAlign

        private java.lang.String applyBlockAlign​(org.w3c.dom.Element e)
      • applyImgStyles

        private java.lang.String applyImgStyles​(org.w3c.dom.Element e)
      • applyTableCellStyles

        private java.lang.String applyTableCellStyles​(org.w3c.dom.Element e)
      • applyTableStyles

        private java.lang.String applyTableStyles​(org.w3c.dom.Element e)
      • applyTableRowStyles

        private java.lang.String applyTableRowStyles​(org.w3c.dom.Element e)
      • applyFloatingAlign

        private void applyFloatingAlign​(org.w3c.dom.Element e,
                                        java.lang.StringBuilder style)
      • applyTextAlign

        private void applyTextAlign​(org.w3c.dom.Element e,
                                    java.lang.StringBuilder style)
      • applyTableContentAlign

        private void applyTableContentAlign​(org.w3c.dom.Element e,
                                            java.lang.StringBuilder style)
      • looksLikeAMangledColor

        private boolean looksLikeAMangledColor​(java.lang.String s)
      • findTable

        private org.w3c.dom.Element findTable​(org.w3c.dom.Element cell)