Ok, I've started writing the actual xsl:fo style, and have a question for you
guys.
The xml I'm using is below, so could you point me in the best direction to get
to the field data of only the current='true' version? Thanks in advance.
<documentContent>
<applicationContent>
<data edlName="Doc.Type.Name">
<version current="false" date="Wed Dec 17 13:55:12 EST
2008"
version="0" />
<version current="true" date="Wed Dec 17 13:55:34 EST
2008"
version="1">
<field name="hiddenfirst">
<value>Joe</value>
</field>
<field name="hiddenlast">
<value>Smith</value>
</field>
<field name="hiddenUserId">
<value>000112345</value>
</field>
<field name="addr1">
<value>s</value>
</field>
<field name="addr2">
<value>asd</value>
</field>
<field name="phone">
<value>999-888-1111</value>
</field>
<field name="email">
<value>[email protected]</value>
</field>
<field name="uStatus">
<value>01</value>
</field>
<field name="responsetype">
<value>Suggestion</value>
</field>
<field name="visitFreq">
<value>01</value>
</field>
<field name="referralBy">
<value>Referral</value>
</field>
<field name="seen">
<value>02</value>
</field>
<field name="haveAppointment">
<value>Yes</value>
</field>
<field name="appointmentHow">
<value>In Person</value>
</field>
<field name="apptWhen">
<value />
</field>
<field name="providerName">
<value />
</field>
<field name="waitTime">
<value>None</value>
</field>
<field name="satisfied">
<value>No</value>
</field>
<field name="comment">
<value>sd</value>
</field>
<field name="suggestion">
<value>sadf3</value>
</field>
</version>
</data>
</applicationContent>
</documentContent>
-----Original Message-----
From: Andreas Delmelle [mailto:[email protected]]
Sent: Wednesday, December 17, 2008 2:23 PM
To: [email protected]
Subject: Re: FOP XML->XSLT->FOP PDF Issues
On 17 Dec 2008, at 20:01, Patterson, Gregory Michael wrote:
Hi
<snip />
> I do have a question (it's simple I think): Looking at the example
> xsl sheets, they utilize the xsl:fo funcationality and tags heavily,
> but I thought that I was told (or read) somewhere that a regular
> xslt stylsheet could be used as well. Is that the case, or will I
> need write specially formatted xsl:fo styles for each form I need to
> generate a pdf from? Thanks
Well, FOP is short for FO-Processor, so only deals with FO as input
(an XML document in the XSL-FO namespace, adhering rules set out in
the XSL-FO Recommendation). The XSLT specification grew out of XSL-FO,
since there are many other use-cases for stylesheet transformations
that have nothing to do with FO.
Most of these cases are XML-to-XML/HTML, so transforming the structure
of a given source XML to yield a different one, or meant for a
different output target. The most notable one is HTML or XHTML, but
plain text is also a possibility. You could write a second stylesheet
that transforms your XML into XHTML for alternate display in a web
browser, if you'd like...
FOP offers the option to supply XML+XSLT as input, but this is more
for users' convenience as the transformation from source XML to FO is
taken care of by an XSLT processor (whichever one is available on the
classpath).
To answer your question (if I get it correctly):
If you need PDF based on XML data, and you want to produce it using
FOP, you'll indeed need to get familiar with both XSL-FO and XSLT. The
benefit here is that you can use the same stylesheet for multiple
output formats (PDF/PostSript/AFP/Java2D/RTF).
Cheers
Andreas
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
__________ Information from ESET Smart Security, version of virus signature
database 3699 (20081217) __________
The message was checked by ESET Smart Security.
http://www.eset.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]