This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: How can I use external variables for transforming XML into another format


Hello Anna,

at first the general way. The way the variable comes to your stylesheet is
dependent on your processor or your framework. I can only give you an
example, here Xalan commandline:

java org.apache.xalan.xslt.Process -IN foo.xml -XSL foo.xsl -OUT
oo.out  -PARAM name value

Now in the stylesheet you have to write a global <xsl:param
name="name">default</xsl:param>.

In your case I can't recommend this way. You need one large stylesheet which
has all templates for FO and HTML in it or includes all other stylesheets.
But FO and HTML are to different. In my eyes it's the best way to have a
foo2fo.xsl and a foo2html.xsl and these two stylesheets (or more if you need
more output formats) include all needed stylesheets, so maybe common ones
for FO and HTML. Have a look at DocBook
(http://sourceforge.net/projects/docbook/) in the XSL-version. They have
very modular stylesheets for FO and HTML and use common ones too.

Regards,

Joerg

> I am a beginner and I want to know if it is possible to use the xslt with
> external variable for transforming XML into a new document. This new
> document will be HTML, PDF, etc. The document's format depends the
external
> variable.
>  What can I do?
>  Thank you very much,
>       Anna.


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]