Class XIncludeExtension

All Implemented Interfaces:

public class XIncludeExtension extends Object implements ReportFactoryExtension
A ReportFactoryExtension that adds support for XML Inclusions (XInclude). Support for this is based on the working note describing version 1.1. The following changes are made to that note:
  1. The "parse" attribute defaults to the content-type of the resource being loaded, with "application/xml" being used as a fallback.
  2. The "bfo:xslt" attribute can be set to apply an XSLT stylesheet as the final stage of processing, after any xpointer is evaluated. It will be applied to each Node
  3. Content of type "text/html" is parsed as if it were XML. Other types are inserted into the document's page list at that point in the document, if supported.
  4. Fragments on URLs may be used as a lower-priority alternative to setting "fragid" or "xpointer"
  • Constructor Details

    • XIncludeExtension

      public XIncludeExtension()
  • Method Details

    • setAllowFragments

      public void setAllowFragments(boolean fragments)
      As specified the href passed into xi:include does not allow fragments to be specified. By default this implementation does allow them, as a lower-priority alternative to the \"fragid\" and \"xpointer\" attributes. Set this value to false to disallow them, as required by the specification.
    • setExceptionsAreFatal

      public void setExceptionsAreFatal(boolean fatal)
    • getExceptionsAreFatal

      public boolean getExceptionsAreFatal()
    • startDocument

      public void startDocument(XMLParser.Context ctx)
      Specified by:
      startDocument in interface ReportFactoryExtension