be.re.repo
Interface XMLInputFactory


public interface XMLInputFactory

The interface to create a StAX stream from a byte stream. A transformation from a non-XML format make take place. The source is read from the request stream. The module is combined with an XML-transformer that comes between this module and a XMLStorage or XMLStorageDelta module. This chain is constructed dynamically based on the provided MIME type and the MIME type of the document in the repository.

Such modules are declared in /configuration/maps.xml using the xml-in element as in the following example:

 <xml-in>
   <!-- Several path elements can come here. -->
   <from>
     <mime-type>* /*+xml</mime-type>
   </from>
   <to>
     <mime-type>* /*</mime-type>
     <namespace>*</namespace>
     <local-name>*</local-name>
   </to> 
   <class>
     <name>be.re.repo.mod.DefaultXMLInputFactory</name>
     <!-- Optional URL relative to maps.xml.
     <jar>modules/my_module.jar</jar>
     -->
   </class>
 </xml-in>
 
 

Author:
Werner Donné
See Also:
XMLStorage, XMLStorageDelta

Method Summary
 XMLEventReader create(String vcr, String version, String systemId, InputStream in, XMLResolver entityResolver, boolean expand, String mimeType, Context context)
           
 

Method Detail

create

XMLEventReader create(String vcr,
                      String version,
                      String systemId,
                      InputStream in,
                      XMLResolver entityResolver,
                      boolean expand,
                      String mimeType,
                      Context context)
                      throws XMLStreamException
Parameters:
vcr - the local path of the VCR.
version - the local path of the version.
systemId - can be used to resolve relative URLs.
in - the inputstream of the version.
entityResolver - a StAX entity resolver.
expand - whether XML-entities and XInclude elements should be expanded in the result.
mimeType - the MIME type of the document.
context - the repository context.
Returns:
The XML-stream from which the result is read.
Throws:
XMLStreamException