Please can you answer a couple of questions based on the code below (excludes the try/catch blocks), which transforms input XML and XSL files into an output XSL-FO file:
File xslFile = new File("inXslFile.xsl"); File xmlFile = new File("sourceXmlFile.xml"); TransformerFactory tFactory = TransformerFactory.newInstance(); Transformer transformer = tFactory.newTransformer(new StreamSource(xslFile)); FileOutputStream fos = new FileOutputStream(new File("outFoFile.fo"); transformer.transform(new StreamSource(xmlFile), new StreamResult(fos));
inXslFile is encoded using UTF-8 - however there are no tags in file which states this. sourceXmlFile is UTF-8 encoded and there may be a metatag at start of file indicating this.
am currently using Java 6 with intention of upgrading in the future.
- What encoding is used when reading the xslFile?
- What encoding is used when reading the xmlFile?
- What encoding will be applied to the FO outfile?
- How can I obtain the info (properties) for 1 - 3? Is there a method call?
- How can the properties in 4 be altered - using configuration and dynamically?
- if known - Where is there info (web site) on this that I can read - I have looked without much success.