Loading ...
Sorry, an error occurred while loading the content.

Re: [XSL-FO] FOP: xsl parameters in java app/TimeStamping a document

Expand Messages
  • Mike Trotman
    If you have control over the XSLT - you can put your parameters in a separate XML file and either import this file - or define a global variable to hold it s
    Message 1 of 3 , Apr 28, 2005
    • 0 Attachment
      If you have control over the XSLT - you can put your parameters in a
      separate XML file
      and either import this file - or define a global variable to hold it's
      contents.
      E.g.
      <xsl:variable name='params' select='document("......")'/>

      You can then define other variables from this
      E.g.
      <xsl:variable name='favouritemeal' select='$params/TOP/MEALS[1]'/>

      If you have a web server and can add scripts to it then it is simple to
      create a script that returns the
      current time wrapped in XML.
      So: e.g.
      <xsl:variable name='currenttime'
      select='document("http://www.mysite.sfx/cgi-bin/currenttime.pl")'/>

      I use this approach in FO for including dynamically generated graphics
      in the final PDF
      but it should work just as well in the preceding XSLT phase.

      Mike

      arianhojat2000 wrote:

      >Hey i was wondering if i am to use fop in a simple java app, i would
      >like to specify the xml file, the xsl to transform it, and also
      >parameters such as Date so i can timestamp it.
      >
      >I checked out EXSLT as somone suggested to timestamp a pdf, but it
      >seemed to me that the DATE/TIME functions for this are to return an
      >hour pretend from a xpath-like xs:date type you pass it. nothing to
      >actually get a date but work with date types. Am i correct here?
      >
      >Anyway if a java app is the way to go... How would i send parameters to
      >my xsl stylesheet from FOP, either command line or in the app itself. i
      >guess i could use saxon 1st to transform (with paremters) to xsl-fo
      >then fop to pdf-ize it, but fop i assume uses xalan? or saxon to
      >transform and maybe it can cut the middleman somehow.
      >
      >
      >



      --
      No virus found in this outgoing message.
      Checked by AVG Anti-Virus.
      Version: 7.0.308 / Virus Database: 266.10.4 - Release Date: 27/04/2005
    Your message has been successfully submitted and would be delivered to recipients shortly.