You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by Abhijit Junnare <ma...@yahoo.com> on 2003/10/08 18:56:44 UTC

Using values from a different XML as attribute values

Hi,
I know this list is mainly for FOP questions. My
question in mainly related to XSLT but I am posting
this just in case if anyone has done what I am trying
to achieve. 
I dont really know if what I have in mind is feasible.
I have a stylesheet that is used for a number of
documents. This stylesheet is used to generate PDF
using FOP. Hence I am setting various attribute values
such as page size, margins, font-size, font-family etc
in the stylesheet. 
What I would like to know is that is there a way to
get the values of these paramters from another XML
file dynamically. I mean depending on the attribute
values in the XML I want to conver to PDF I would like
to get values from another XML for the above mentioned
attributes. I think this is like opening a XML file
through XSL and accessing the content in the XML.
I would like to know if this is feasible and if anyone
has tried something similar.
Thanks,
Abhi

__________________________________
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org


RE: Using values from a different XML as attribute values

Posted by "Andreas L. Delmelle" <a_...@pandora.be>.
> -----Original Message-----
> From: Abhijit Junnare [mailto:mavlaabhi@yahoo.com]

> I would like to know if this is feasible and if anyone
> has tried something similar.

It certainly is feasible. I remember a vaguely similar situation where I had
to have multi-language support, and I did not want to hard-code a separate
XSLT for each language...
There are a number of possible approaches. In attachment you will find two
possible methods of dealing with this. I dl'ed them from some 'XML-tips'
website, but I seem to have lost the address...
As you can derive from the names of the zips, there should also exist a
'Method1', but for some reason I didn't find that method to be very useful.
(Sorry I can't be more specific; it's been quite a long time since I had a
look at these, but they may give you some ideas.)

I hope you find them to be of use. XSL needs to be modified if you want to
use the second XML for attribute values instead of element names.

Greetz,

Andreas