View Single Post
  #1 (permalink)  
Old December 15th, 2008, 08:59 AM
maikm maikm is offline
Registered User
 
Join Date: Aug 2008
Location: , , Germany.
Posts: 8
Thanks: 2
Thanked 0 Times in 0 Posts
Send a message via AIM to maikm
Default Accessing secondary result documents from Java

Hi folks (Hi Michael ;~)

I have one source XML and several destination XML documents. I'm generating the main result document with Saxon B9, and the XSLT contains something like the following section:

Code:
<xsl:result-document href="secondary.xml">
    (...some code...)
</xsl:result-document>
The calling Java code looks like this:
Code:
    String path = workdir.getAbsolutePath();
    DOMSource domSource = new DOMSource( domDocument, path );
    xslttrans.setSource( domSource );
    Serializer ser = new Serializer();
    ser.setOutputFile( new File( path + "/" + "document.xml" ) );
    xslttrans.setDestination( ser );
    xslttrans.transform();
I get the main result document, but I can't figure out how to access the secondary file. It's not being written at the same directory as the main output, and I can't figure out how to set the base URI that might be needed for it to do that. Any hints anyone?

Thanks
Maik
Reply With Quote