validate XML file against schema and feed an XSL transform
I have an XML file that follows an XML schema, and I have an XSL transformation that converts the input XML file into a properties file (text format "key=value", not an XML properties file).
What I have to do is:
- Check that the input file is valid against the schema
- Apply the XSL transformation to the input XML file
- Feed the result of the XSL transformation to the method load(InputStream) of class Properties.
However, as far as I know, I can get the result of the XSL transformation in a StreamResult or SAXResult, but the former returns an OutputStream object, not an InputStream object, as the Properties.load() method requires. Besides, I wouldn't want to use a DOMSource for performance reasons.
Could anybody help me? Any hint or suggestion would be highly appreciated.