Not Exactly a Java problem... but XSL
the problem is I have is as follows:
there are 4 XSL templates or files.
i can create PDF documents using Jakarta FOP tool.
now what i want is a single PDF of all the documents(XSL's).
How do i merge all the XSL's..... can i use something like a master XSL that calls the other 4 documenst one after the other.
Something like <XSL:Import> or <XSL:Include>
please help.
praneeth
>
> How do i merge all the XSL's..... can i use something
> like a master XSL that calls the other 4 documenst
> one after the other.
>
> Something like <XSL:Import> or <XSL:Include>
>
You can import other stylesheets and use the templates they contain. You can also import one or more stylesheets and then optionally redefine any templates that they define.
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:java="http://xml.apache.org/xslt/java" exclude-result-prefixes="java">
<!-- import the core functionality -->
<xsl:import href="../common/generic_csv.xslt"/>
Some other templating code...
</xsl:stylesheet>
Is this what you are after?
all the 4 documents are XSL's and not XSLT.
i did this
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format">
<xsl:import href="15721_English_Version.xsl"/>
<xsl:import href="15721_French_Version.xsl"/>
</xsl:stylesheet>
Now the French version prints but not the English......
its like this... if i have 4 docs(XSL's) 1, 2, 3, 4
and i import all the 4th document is displayed but the 1, 2, 3 docs are not .
that is what i wnt.
thanx...
I'm presuming (as you've not given us much to go on...) that the english and french xsl files contain the same templates, just outputting the different languages. If that's the case, note what I said about redefining. In essence, you've overriden the the english templates with the french ones.
I'm also presuming (in the absence of detail) that the stylesheets are generating FO code from an xml source? If that's the case you need to combine the output of the transformation, not the transformation code itself.
I think you want to use the document function:
<xsl:value-of select="document('myOtherFODocument.xml')"/>
The following link shows it being used in anger:
http://dev.w3.org/cvsweb/2002/ws/desc/test-suite/results/combine.xslt?rev=1.4&content-type=text/x-cvsweb-markup