Package org.xhtmlrenderer.simple.extend
Class XhtmlNamespaceHandler
- java.lang.Object
-
- org.xhtmlrenderer.swing.NoNamespaceHandler
-
- org.xhtmlrenderer.simple.extend.XhtmlCssOnlyNamespaceHandler
-
- org.xhtmlrenderer.simple.extend.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.- Author:
- Torbjörn Gannholm
-
-
Constructor Summary
Constructors Constructor Description XhtmlNamespaceHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getImageSourceURI(org.w3c.dom.Element e)
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.java.lang.String
getNonCssStyling(org.w3c.dom.Element e)
may return nullboolean
isFormElement(org.w3c.dom.Element e)
Determines whether or not the specified Element represents a <form>.boolean
isImageElement(org.w3c.dom.Element e)
-
Methods inherited from class org.xhtmlrenderer.simple.extend.XhtmlCssOnlyNamespaceHandler
getAnchorName, getClass, getDefaultStylesheet, getDocumentTitle, getElementStyling, getID, getLinkUri, getNamespace, getStylesheets
-
Methods inherited from class org.xhtmlrenderer.swing.NoNamespaceHandler
getAttributeValue, getAttributeValue, getLang
-
-
-
-
Method Detail
-
isImageElement
public boolean isImageElement(org.w3c.dom.Element e)
- Specified by:
isImageElement
in interfaceNamespaceHandler
- Overrides:
isImageElement
in classNoNamespaceHandler
- Returns:
- Returns true if the Element represents an image.
-
isFormElement
public boolean isFormElement(org.w3c.dom.Element e)
Determines whether or not the specified Element represents a <form>.- Specified by:
isFormElement
in interfaceNamespaceHandler
- Overrides:
isFormElement
in classNoNamespaceHandler
- 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 whereNamespaceHandler.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 interfaceNamespaceHandler
- Overrides:
getImageSourceURI
in classNoNamespaceHandler
- Parameters:
e
- The element to extract image info from.- Returns:
- String containing the URI for the image.
-
getNonCssStyling
public java.lang.String getNonCssStyling(org.w3c.dom.Element e)
Description copied from interface:NamespaceHandler
may return null- Specified by:
getNonCssStyling
in interfaceNamespaceHandler
- Overrides:
getNonCssStyling
in classNoNamespaceHandler
- Returns:
- The corresponding css properties for styling that is obtained in other ways.
-
-