org.xhtmlrenderer.simple.extend
Class XhtmlNamespaceHandler
java.lang.Object
org.xhtmlrenderer.simple.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:
- Torbjoern Gannholm
Methods inherited from class org.xhtmlrenderer.simple.extend.XhtmlCssOnlyNamespaceHandler |
convertToLength, getAnchorName, getAttribute, getClass, getDefaultStylesheet, getDocumentTitle, getElementStyling, getID, getLang, getLinkUri, getNamespace, getStylesheets, isInteger, readLinkElement, readStyleElement |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
XhtmlNamespaceHandler
public XhtmlNamespaceHandler()
isImageElement
public boolean isImageElement(Element e)
-
- Specified by:
isImageElement
in interface NamespaceHandler
- Overrides:
isImageElement
in class NoNamespaceHandler
- Returns:
- Returns true if the Element represents an image.
isFormElement
public boolean isFormElement(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 String getImageSourceURI(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.
getNonCssStyling
public String getNonCssStyling(Element e)
- Description copied from interface:
NamespaceHandler
- may return null
- Specified by:
getNonCssStyling
in interface NamespaceHandler
- Overrides:
getNonCssStyling
in class NoNamespaceHandler
- Returns:
- The corresponding css properties for styling that is obtained in other ways.
Copyright © 2012. All Rights Reserved.