Interface NamespaceHandler
- All Known Implementing Classes:
NoNamespaceHandler, XhtmlCssOnlyNamespaceHandler, XhtmlNamespaceHandler
public interface NamespaceHandler
Provides knowledge specific to a certain document type, like resolving
style-sheets
-
Method Summary
Modifier and TypeMethodDescriptiongetAttributeValue(Element e, String attrName) may return null.getAttributeValue(Element e, String namespaceURI, String attrName) may return nullgetDefaultStylesheet(StylesheetFactory factory) getDocumentTitle(Document doc) may return nullmay return nullFor 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.may return nullshould return null if element is not a linkmay return nullgetStylesheets(Document doc) booleanDetermines whether or not the specified Element represents a <form>.boolean
-
Method Details
-
getNamespace
String getNamespace()- Returns:
- the namespace handled
-
getDefaultStylesheet
- Returns:
- the default CSS stylesheet for this namespace
-
getDocumentTitle
-
getStylesheets
- Parameters:
doc-- Returns:
- all links to CSS stylesheets (type="text/css") in this document
-
getAttributeValue
-
getAttributeValue
-
getClass
-
getID
-
getElementStyling
-
getNonCssStyling
-
getLang
-
getLinkUri
-
getAnchorName
-
isImageElement
- Returns:
- Returns true if the Element represents an image.
-
isFormElement
Determines whether or not the specified Element represents a <form>.- Parameters:
e- The Element to evaluate.- Returns:
- true if the Element is a <form> element, false otherwise.
-
getImageSourceURI
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 whereisImageElement(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.- Parameters:
e- The element to extract image info from.- Returns:
- String containing the URI for the image.
-