Interface XHTMLDepictContext

All Superinterfaces:
DepictContext, com.globalmentor.beans.PropertyBindable, TextDepictContext, XMLDepictContext
All Known Subinterfaces:
WebDepictContext
All Known Implementing Classes:
AbstractWebDepictContext, AbstractXHTMLDepictContext, HTTPServletWebDepictContext

public interface XHTMLDepictContext extends XMLDepictContext
Encapsulation of application/xhtml+xml information related to the current depiction.
Author:
Garret Wilson
See Also:
  • Field Details

    • CSS_PROPERTY_BORDER_X_COLOR_TEMPLATE

      static final com.globalmentor.text.StringTemplate CSS_PROPERTY_BORDER_X_COLOR_TEMPLATE
      The template for "border-?-color".
    • CSS_PROPERTY_BORDER_X_Y_RADIUS_TEMPLATE

      static final com.globalmentor.text.StringTemplate CSS_PROPERTY_BORDER_X_Y_RADIUS_TEMPLATE
      The template for "border-?-?-radius".
    • CSS_PROPERTY_BORDER_X_STYLE_TEMPLATE

      static final com.globalmentor.text.StringTemplate CSS_PROPERTY_BORDER_X_STYLE_TEMPLATE
      The template for "border-?-style".
    • CSS_PROPERTY_BORDER_X_WIDTH_TEMPLATE

      static final com.globalmentor.text.StringTemplate CSS_PROPERTY_BORDER_X_WIDTH_TEMPLATE
      The template for "border-?-width".
    • CSS_PROPERTY_MARGIN_X_TEMPLATE

      static final com.globalmentor.text.StringTemplate CSS_PROPERTY_MARGIN_X_TEMPLATE
      The template for "margin-?".
    • CSS_PROPERTY_PADDING_X_TEMPLATE

      static final com.globalmentor.text.StringTemplate CSS_PROPERTY_PADDING_X_TEMPLATE
      The template for "padding-?".
    • CSS_SIDES

      static final Set<Side> CSS_SIDES
      The sides supported by CSS.
  • Method Details

    • registerDataAttributeNamespaceURI

      void registerDataAttributeNamespaceURI(URI namespaceURI)
      Registers a namespace URI to be represented as an HTML5 data attribute. Any attribute in this namespace will be converted to lowercase and presented as an HTML5 attribute. For example, an attribute in the form example:fooBar will be depicted as data-example-foobar.
      Parameters:
      namespaceURI - The namespace URI to register.
      Throws:
      NullPointerException - if the given namespace URI is null.
    • isDataAttributeNamespaceURI

      boolean isDataAttributeNamespaceURI(URI namespaceURI)
      Determines whether the given namespace URI should be represented as an HTML5 data attribute.
      Parameters:
      namespaceURI - The namespace URI to check.
      Returns:
      true if the given namespace URI should be represented as an HTML5 data attribute.
    • isAllDataAttributes

      boolean isAllDataAttributes()
      Returns whether all non-default-namespace attributes are encoded at HTML5 data attributes. This setting overrides isDataAttributeNamespaceURI(URI) .
      Returns:
      Whether all non-default-namespace attributes are encoded at HTML5 data attributes.
    • setAllDataAttributes

      void setAllDataAttributes(boolean dataAttributesEnabled)
      Sets whether all non-default-namespace attributes are encoded at HTML5 data attributes. If this setting is enabled, any non-default-namespace attribute will be converted to lowercase and presented as an HTML5 attribute. For example, an attribute in the form example:fooBar will be depicted as data-example-foobar.

      If set to true, the setting of isDataAttributeNamespaceURI(URI) is ignored.

      Parameters:
      dataAttributesEnabled - Whether non-XHTML-namespace attributes are encoded at HTML5 data attributes.
    • writeJavaScriptElement

      XMLDepictContext.ElementState writeJavaScriptElement(URI javascriptURI) throws IOException
      Generates a JavaScript element that references the given URI. The given URI is resolved to the application path.
      Parameters:
      javascriptURI - The application-relative IRO to the JavaScript file.
      Returns:
      The state of the element written.
      Throws:
      IOException - if there is an error writing the information.
    • writeMetaElement

      XMLDepictContext.ElementState writeMetaElement(String property, String content) throws IOException
      Generates a meta element suitable for the head of an XHTML document.
      Parameters:
      property - The meta property name.
      content - The meta property content.
      Returns:
      The state of the element written.
      Throws:
      IOException - if there is an error writing the information.
    • writeMetaElement

      XMLDepictContext.ElementState writeMetaElement(URI propertyNamespaceURI, String propertyLocalName, String content) throws IOException
      Generates a meta element suitable for the head of an XHTML document, creating a qualified name or the meta property based upon the given namespace URI and local name.
      Parameters:
      propertyNamespaceURI - The URI of the XML namespace of the meta property name, or null if there is no namespace.
      propertyLocalName - The local name of the meta property name with no prefix.
      content - The meta property content.
      Returns:
      The state of the element being written.
      Throws:
      IOException - if there is an error writing the information.