Package com.xmlmind.xinclude
Class XLoader
- java.lang.Object
-
- com.xmlmind.domutil.LoaderImpl
-
- com.xmlmind.xinclude.XLoader
-
- All Implemented Interfaces:
Loader
public final class XLoader extends LoaderImpl
An implementation ofLoaderwhich makes use of the XInclude 1.1 processor contained in this package.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Documentload(InputStream in, URL url)Load document from specified input stream.voiduseBothLang()Use both "xml:lang" and "lang" as the language attributes.voiduseId()Use "id" as the ID attribute.voiduseLang()Use "lang" as the language attribute.voiduseXMLId()Use "xml:id" as the ID attribute.voiduseXMLLang()Use "xml:lang" as the language attribute.-
Methods inherited from class com.xmlmind.domutil.LoaderImpl
createXMLReader, format, getConsole, getEntityResolver, isAddingElementPointer, load, load, setAddingElementPointer, setConsole, setEntityResolver
-
-
-
-
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:LoaderLoad document from specified input stream.Note:
xi:includeelements (XInclude) are expected to have been processed in the loaded document.- Specified by:
loadin interfaceLoader- Overrides:
loadin classLoaderImpl- Parameters:
in- input stream allowing to load the documenturl- URL of the document to be loaded if known;nullotherwise- 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 asIOExceptions.
-
-