hi all,
I have a XSLT which will split large xml file into multiple xml file with the use of following xslt code.
<xsl:variable name="filename" select="resolve-uri(concat('splitfilesfolder/',position(),'.xml'))" />
<xsl:result-document href="{$filename}" format="xml">
<--XML file content --->
</xsl:result-document>
then i have used that XSLT in my code to split input XML file using javax.xml.transform.Transformer.
TransformerFactory tFactory = TransformerFactory.newInstance();
Source xslSource = new StreamSource(xsltfilepath);
Transformer trans = tFactory.newTransformer(xslSource);
trans.transform(new StreamSource(xmlFileName), new StreamResult(splitfilesfolder));
Here i want to give same path for new Streamresult as it is in result document path how can i transform multiple xml file using result doucment and javax.xml.transform.Transform ??
Can anybody please give me a solution ?
Thanks in advance.