Class NoNamespaceHandler
java.lang.Object
com.openhtmltopdf.simple.NoNamespaceHandler
- All Implemented Interfaces:
NamespaceHandler
- Direct Known Subclasses:
XhtmlCssOnlyNamespaceHandler
Handles a general XML document
-
Field Summary
Fields -
Constructor Summary
Constructors -
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
-
Field Details
-
_namespace
- See Also:
-
_typePattern
-
_hrefPattern
-
_titlePattern
-
_alternatePattern
-
_mediaPattern
-
-
Constructor Details
-
NoNamespaceHandler
public NoNamespaceHandler()
-
-
Method Details
-
getNamespace
- Specified by:
getNamespacein interfaceNamespaceHandler- Returns:
- the namespace handled
-
getAttributeValue
Description copied from interface:NamespaceHandlermay return null. Required to return null if attribute does not exist and not null if attribute exists.- Specified by:
getAttributeValuein interfaceNamespaceHandler- Parameters:
e- PARAMattrName- PARAM- Returns:
- The attributeValue value
-
getAttributeValue
- Specified by:
getAttributeValuein interfaceNamespaceHandler
-
getClass
Description copied from interface:NamespaceHandlermay return null- Specified by:
getClassin interfaceNamespaceHandler- Parameters:
e- PARAM- Returns:
- The class value
-
getID
Description copied from interface:NamespaceHandlermay return null- Specified by:
getIDin interfaceNamespaceHandler- Parameters:
e- PARAM- Returns:
- The iD value
-
getLang
Description copied from interface:NamespaceHandlermay return null- Specified by:
getLangin interfaceNamespaceHandler- Parameters:
e- PARAM- Returns:
- The lang value
-
getElementStyling
Description copied from interface:NamespaceHandlermay return null- Specified by:
getElementStylingin interfaceNamespaceHandler- Parameters:
e- PARAM- Returns:
- The elementStyling value (style attribute)
-
getNonCssStyling
Description copied from interface:NamespaceHandlermay return null- Specified by:
getNonCssStylingin interfaceNamespaceHandler- Parameters:
e-- Returns:
- The corresponding css properties for styling that is obtained in other ways.
-
getLinkUri
Description copied from interface:NamespaceHandlershould return null if element is not a link- Specified by:
getLinkUriin interfaceNamespaceHandler- Parameters:
e- PARAM- Returns:
- The linkUri value
-
getDocumentTitle
- Specified by:
getDocumentTitlein interfaceNamespaceHandler- Parameters:
doc-- Returns:
- the title for this document, if any exists
-
getAnchorName
- Specified by:
getAnchorNamein interfaceNamespaceHandler- Parameters:
e-
-
isImageElement
- Specified by:
isImageElementin interfaceNamespaceHandler- Returns:
- Returns true if the Element represents an image.
-
getImageSourceURI
Description copied from interface:NamespaceHandlerFor 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:
getImageSourceURIin interfaceNamespaceHandler- Parameters:
e- The element to extract image info from.- Returns:
- String containing the URI for the image.
-
isFormElement
Description copied from interface:NamespaceHandlerDetermines whether or not the specified Element represents a <form>.- Specified by:
isFormElementin interfaceNamespaceHandler- Parameters:
e- The Element to evaluate.- Returns:
- true if the Element is a <form> element, false otherwise.
-
getStylesheets
- Specified by:
getStylesheetsin interfaceNamespaceHandler- Parameters:
doc-- Returns:
- all links to CSS stylesheets (type="text/css") in this document
-
getDefaultStylesheet
- Specified by:
getDefaultStylesheetin interfaceNamespaceHandler- Returns:
- the default CSS stylesheet for this namespace
-