Package org.faceless.publisher.ext
Class XIncludeExtension
java.lang.Object
org.faceless.publisher.ext.XIncludeExtension
- All Implemented Interfaces:
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:
- The "parse" attribute defaults to the content-type of the resource being loaded, with "application/xml" being used as a fallback.
- 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
- 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.
- Fragments on URLs may be used as a lower-priority alternative to setting "fragid" or "xpointer"
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
configure
(Json json) Configure the extension.boolean
Return the value set insetAllowFragments(boolean)
boolean
Return the value set insetExceptionsAreFatal(boolean)
void
setAllowFragments
(boolean fragments) As specified the href passed into xi:include does not allow fragments to be specified.void
setExceptionsAreFatal
(boolean fatal) Set whether exceptions encountered during XInclude processing are fatal, or just lead to the document being processed without the included file The default is trueMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.faceless.publisher.ext.ReportFactoryExtension
load, register, register, unregister, unregister
-
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) Set whether exceptions encountered during XInclude processing are fatal, or just lead to the document being processed without the included file The default is true- Parameters:
fatal
- if true, exceptions while processing XInclude are fatal.
-
isExceptionsAreFatal
public boolean isExceptionsAreFatal()Return the value set insetExceptionsAreFatal(boolean)
-
isAllowFragments
public boolean isAllowFragments()Return the value set insetAllowFragments(boolean)
-
configure
public void configure(Json json) Description copied from interface:ReportFactoryExtension
Configure the extension. This method will be called by the web-service immediately after the extension is added, to pass in any parameters set by the user. The default implementation does nothing- Specified by:
configure
in interfaceReportFactoryExtension
-