Class XLoader

  • All Implemented Interfaces:
    Loader

    public final class XLoader
    extends LoaderImpl
    An implementation of Loader which makes use of the XInclude 1.1 processor contained in this package.
    • Constructor Detail

      • XLoader

        public XLoader()
      • XLoader

        public XLoader​(Console c)
    • Method Detail

      • useXMLId

        public void useXMLId()
        Use "xml:id" as the ID attribute.

        Needed to process XIncludes in loaded pages.

        This setting is the default one.

      • useId

        public void useId()
        Use "id" as the ID attribute.

        Needed to process XIncludes in loaded pages.

      • useXMLLang

        public void useXMLLang()
        Use "xml:lang" as the language attribute.

        Needed to process XIncludes in loaded pages.

        This setting is the default one.

      • useLang

        public void useLang()
        Use "lang" as the language attribute.

        Needed to process XIncludes in loaded pages.

      • useBothLang

        public void useBothLang()
        Use both "xml:lang" and "lang" as the language attributes.

        Needed to process XIncludes in loaded pages.

      • load

        public Document load​(InputStream in,
                             URL url)
                      throws IOException
        Description copied from interface: Loader
        Load document from specified input stream.

        Note: xi:include elements (XInclude) are expected to have been processed in the loaded document.

        Specified by:
        load in interface Loader
        Overrides:
        load in class LoaderImpl
        Parameters:
        in - input stream allowing to load the document
        url - URL of the document to be loaded if known; null otherwise
        Returns:
        loaded document
        Throws:
        IOException - if, for any reason, an I/O exception is raised during the processing. Note that XML parse exception and XInclude exception are reported as IOExceptions.