java.lang.Object
org.xhtmlrenderer.simple.NoNamespaceHandler
org.xhtmlrenderer.simple.extend.XhtmlCssOnlyNamespaceHandler
- All Implemented Interfaces:
NamespaceHandler
- Direct Known Subclasses:
XhtmlNamespaceHandler
Handles xhtml but only css styling is honored,
no presentational html attributes (see css 2.1 spec, 6.4.4)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected StringconvertToLength(String value) @Nullable StringgetAnchorName(@Nullable Element e) protected @Nullable StringgetAttribute(Element e, String attrName) Gets the class attribute of the XhtmlNamespaceHandler objectgetDocumentTitle(Document doc) Returns the title of the document as located in the contents of /html/head/title, or "" if none could be found.Gets the elementStyling attribute of the XhtmlNamespaceHandler object@Nullable StringGets the iD attribute of the XhtmlNamespaceHandler object@Nullable StringGets the linkUri attribute of the XhtmlNamespaceHandler objectGets the namespace attribute of the XhtmlNamespaceHandler objectgetStylesheets(Document doc) Gets the stylesheetLinks attribute of the XhtmlNamespaceHandler objectprotected booleanprotected @Nullable StylesheetInforeadLinkElement(Element link) protected @Nullable StylesheetInforeadStyleElement(Element style) Methods inherited from class org.xhtmlrenderer.simple.NoNamespaceHandler
getAttributeValue, getAttributeValue, getImageSourceURI, getNonCssStyling, isFormElement, isImageElement
-
Constructor Details
-
XhtmlCssOnlyNamespaceHandler
public XhtmlCssOnlyNamespaceHandler()
-
-
Method Details
-
getNamespace
Gets the namespace attribute of the XhtmlNamespaceHandler object- Specified by:
getNamespacein interfaceNamespaceHandler- Overrides:
getNamespacein classNoNamespaceHandler- Returns:
- The namespace value
-
getClass
Gets the class attribute of the XhtmlNamespaceHandler object- Specified by:
getClassin interfaceNamespaceHandler- Overrides:
getClassin classNoNamespaceHandler
-
getID
Gets the iD attribute of the XhtmlNamespaceHandler object- Specified by:
getIDin interfaceNamespaceHandler- Overrides:
getIDin classNoNamespaceHandler
-
convertToLength
-
isInteger
-
getAttribute
-
getElementStyling
Gets the elementStyling attribute of the XhtmlNamespaceHandler object- Specified by:
getElementStylingin interfaceNamespaceHandler- Overrides:
getElementStylingin classNoNamespaceHandler- Returns:
- The elementStyling value
-
getLinkUri
Gets the linkUri attribute of the XhtmlNamespaceHandler object- Specified by:
getLinkUriin interfaceNamespaceHandler- Overrides:
getLinkUriin classNoNamespaceHandler
-
getAnchorName
- Specified by:
getAnchorNamein interfaceNamespaceHandler- Overrides:
getAnchorNamein classNoNamespaceHandler
-
getDocumentTitle
Returns the title of the document as located in the contents of /html/head/title, or "" if none could be found.- Specified by:
getDocumentTitlein interfaceNamespaceHandler- Overrides:
getDocumentTitlein classNoNamespaceHandler- Parameters:
doc- the document to search for a title- Returns:
- The document's title, or "" if none found
-
readStyleElement
-
readLinkElement
-
getStylesheets
Gets the stylesheetLinks attribute of the XhtmlNamespaceHandler object- Specified by:
getStylesheetsin interfaceNamespaceHandler- Overrides:
getStylesheetsin classNoNamespaceHandler- Parameters:
doc- the document- Returns:
- all links to CSS stylesheets (type="text/css") in this document
-
getDefaultStylesheet
- Specified by:
getDefaultStylesheetin interfaceNamespaceHandler- Overrides:
getDefaultStylesheetin classNoNamespaceHandler
-
getLang
- Specified by:
getLangin interfaceNamespaceHandler- Overrides:
getLangin classNoNamespaceHandler
-