I got PasiveTeX going just the other week. Yes your on the right lines, and
almost there. All you need to do now is add in the final transformation.
This is done by adding another processing instruction to the top of your XML
document.
Make it look like this:
<?xml version="1.0" ?>
<?xml-stylesheet href="aaron.xsl" type="text/xsl"?>
<?xml-stylesheet href="NULL" type="text/xslfo"?>
Alternatively you could declare both these in httpd.conf:
AxAddProcessor text/xsl /path/to/aaron.xsl
AxAddProcessor text/xslfo NULL
I think usually the xslfo stage is actually declared as application/xslfo
rather than text/xslfo but it doesn't make any odds... as long as you are
consistent.
From: Aaron Steager <[EMAIL PROTECTED]>
To: axkit-users@axkit.org
Subject: Re: PassiveTeX Questions
Date: Thu, 25 Aug 2005 16:22:54 -0500
Thanks to Mike and Matt for their suggestions. I think XSLFO is what I'm
going to need. I found out what I'm going to need to generated and it has
quite a bit of complexity to it so I'm trying to get PassiveTeX going. I
did more research and I think I am on the right track but I'm not sure. I
have aaron.xml which goes through aaron.xsl and when I view aaron.xml in a
web browser it looks like a XSLFO file with fo prefixes. So this is what I
need to pass to PassiveTeX correct? But how do I pass it along to
PassiveTeX? Do I have another stylesheet or can I just add something to
the one I already have? Below are all the files I'd appreciate to know if
I am on the right track or if I am way off.
Thanks
Aaron
AARON.XML
<?xml version="1.0" ?>
<?xml-stylesheet href="aaron.xsl" type="text/xsl"?>
<document>
<head>My very first xsl-fo document</head>
<para>has an <em>important</em> paragraph inside it</para>
</document>
AARON.XSL
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fo="http://www.w3.org/1999/XSL/Format"
version="1.0">
<xsl:output method="xml"/>
<xsl:template match="/">
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
<fo:layout-master-set> <fo:simple-page-master
master-name="simple" page-height
="29.7cm" page-width ="21cm"
margin-left ="2.5cm"
margin-right ="2.5cm">
<fo:region-body margin-top="3cm"/> </fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence
master-reference="simple"> <fo:flow
flow-name="xsl-region-body"> <xsl:apply-templates/>
</fo:flow>
</fo:page-sequence>
</fo:root>
</xsl:template>
<xsl:template match="document"> <fo:block>
<xsl:apply-templates/>
</fo:block>
</xsl:template>
<xsl:template match="head"> <fo:block>
<xsl:apply-templates/>
</fo:block>
</xsl:template>
<xsl:template match="para"> <fo:block>
<xsl:apply-templates/>
</fo:block>
</xsl:template>
<xsl:template match="em"> <fo:inline font-style="italic">
<xsl:apply-templates/>
</fo:inline>
</xsl:template>
</xsl:stylesheet>
AARON.XML VIEWED THROUGH THE WEB BROWSER
<fo:root>
<fo:layout-master-set>
<fo:simple-page-master master-name="simple" page-height="29.7cm"
page-width="21cm" margin-left="2.5cm" margin-right="2.5cm">
<fo:region-body margin-top="3cm"/>
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="simple">
<fo:flow flow-name="xsl-region-body">
<fo:block>
<fo:block>My very first xsl-fo document</fo:block>
<fo:block>
has an
<fo:inline font-style="italic">important</fo:inline>
paragraph inside it
</fo:block>
</fo:block>
</fo:flow>
</fo:page-sequence>
</fo:root>
HTTPD.CONF
PerlModule Apache::DBI
PerlModule AxKit
AddHandler axkit .xml .xsp
DirectoryIndex index.xsp
AxCacheDir /var/cache/axkit/
AxAddStyleMap application/x-xsp Apache::AxKit::Language::XSP
AxAddStyleMap text/xsl Apache::AxKit::Language::LibXSLT
AxAddStyleMap text/xslfo Apache::AxKit::Language::PassiveTeX
Mike Trotman wrote:
Hi Aaron
I haven't used PassiveTex directly for producing PDFs
- but there is a working example in the AxKit distribution for AxPoint
which will give you a working set of files and Apache configuration to
amend.
I would say whether you use AxPoint, PassiveTex or something else depends
on what sort of PDF.you are trying to produce.
AxPoint (using PassiveTex) looks good presentation type slides.
It also has very simple syntax.
As there are more features of XSL-FO that PassiveTex doesn't support fully
than - say - Apache FOP
I would recommend using XSL:FO and FOP for anything more complex.
But - if you are mainly trying for One-Page PDF posters then I would
recommend seeing if AxPoint meets your needs.
HTH
Mike
Aaron Steager wrote:
Hello all,
This is my first time using a maling list so if I make mistakes let me
know. I have subscribed because I am in need of your help. I have taken
over managing a Debian box (ver 1.16.2) that is running Apache (ver
1.3.26) and we use AxKit. Since it was set up before I was put in charge
I have been able to figure out what I need to do by looking at other
taglib files, xsp's and xsl's to get it done. I will be the first to
admit that I don't understand all of it fully but I understand it enough
to get what I need done. Untill now.
Basically we need to generated pdf's on the fly. From the research I've
done I tried AxPoint which I got working but it didn't generated a 1 page
poster like we needed. I looked at FOP and HTMLdoc but then I came
across PassiveTeX which seems to say it will do what I need it to if I
can figure out how to get it to work. All the examples I have seen
involve using command lines to generate a pdf from a fo file. But what i
need is for someone to go to passive.xsp or passive.fo with their web
browser and it generates a pdf. Which will be changed daily by
information it draws from a PostgreSQL database. Is PassiveTeX the tool I
should use or is the something else that is better suited? If it is does
anyone have some simple xsp fo xsl files I could look at? I'm not asking
for anyone to do my work but a few simple files I could look through
would be greatly appreciated.
Aaron
Here is what I have so far and please feel free to laugh:)
passive.xsp
<?xml-stylesheet href="NULL" type="application/x-xsp"?>
<?xml-stylesheet href="/passive.xsl" type="text/xslfo"?>
<xsp:page xmlns:xsp="http://www.apache.org/xsp/core/v1">
<text>Open Sesame</text>
</xsp:page>
passive.xsl -- Not even close to being right
<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xsp="http://www.apache.org/xsp/core/v1">
<xsl:output method="pdf"/>
<xsl:template match="text">
</xsl:template>
</xsl:stylesheet>
httpd.conf I did add PassiveTeX to it
AxAddStyleMap application/x-xsp Apache::AxKit::Language::XSP
AxAddStyleMap text/xsl Apache::AxKit::Language::LibXSLT
AxAddStyleMap application/xslfo Apache::AxKit::Language::PassiveTeX
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Message Scanned by ClamAV on datalucid.com
--
This message and any other attachments are intended only for the use of the
Recipient and may contain information that is PRIVILEGED and CONFIDENTIAL.
If you are not the intended recipient, you are hereby notified that any
dissemination of this communication is strictly prohibited. If you have
received this communication in error, please erase all copies of the
message and its attachments and notify us immediately. Please be aware that
any views expressed by an individual within this message do not necessarily
reflect the views of the company.
Security Warning: Please note that this email has been created in the
knowledge that Internet email is not a 100% secure communications medium.
We advise that you understand and observe this lack of security when
emailing us. INTRALOT INC is neither liable for the proper and complete
transmission of the information contained in this communication nor for any
delay in its receipt.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
_________________________________________________________________
Want to block unwanted pop-ups? Download the free MSN Toolbar now!
http://toolbar.msn.co.uk/
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]