Hi, all. I am new to FOP. I am successfully creating AFP files but now I am facing a problem with TLE values. It seems I can only set fixed values for TLE. I mean: <afp:tag-logical-element name="User" value="John Doe"/>. What I'd like to have is something like this: <afp:tag-logical-element name="User" value="@User"> Is there someway to have this done? regards, Simone
The typical way of doing this is writing an XSLT. This takes as input an XML (containing the actual user name) and creates as output the XSL:FO. There are of course other ways such as programmatically generating the XSL:FO, using a template engine such as Apache Velocity etc. Apache FOP's input is XSL:FO, have a look at the following links to help you with writing an XSLT. [1] http://www.w3schools.com/xsl/ [2] http://www.mulberrytech.com/xsl/xsl-list/
(In reply to comment #2) > The typical way of doing this is writing an XSLT. This takes as input an XML > (containing the actual user name) and creates as output the XSL:FO. There are > of course other ways such as programmatically generating the XSL:FO, using a > template engine such as Apache Velocity etc. > Apache FOP's input is XSL:FO, have a look at the following links to help you > with writing an XSLT. > [1] http://www.w3schools.com/xsl/ > [2] http://www.mulberrytech.com/xsl/xsl-list/ It is exacly what I am doing. I use Altova StyleVision to create an XSLT-FO. When I have the XSLT-FO, I add the appropriate namespace to use FOP/AFP/TLE extension. In FOP, then, I pass XML and XSLT-FO to print directly, create a PDF, a FO or (in this case) an AFP. I still thank you and Peter for links posted but I can't still find the way to set in XSLT-FO the code tho have TLE values based on XML data. I am stuck at this point.
(In reply to comment #1) > Hi, all. I am new to FOP. OK, so you are asking this on FOP-user list (see [1]), witch is a good start. There is no need to backup this thread on bug tracker, everybody monitoring FOP buglist typically does monitor FOP user list. > What I'd like to have is something like this: > <afp:tag-logical-element name="User" value="@User"> as said by Alexios, this seems to be related to XSLT stage. In order to help community to understand your issue, you should provide a short XSL-FO demonstrating it. That said, in your snippet the value of the [value] attribute is the string "@User", so, unless there is a special processing in AFP renderer for such pattern (I'm not an AFP guru), you'll get the same value "@User". Please continue this discussion on FOP-user list before reopen this issue. If the corresponding thread [1] conclude to an issue, feel free to reopen this. [1] http://www.mail-archive.com/fop-users@xmlgraphics.apache.org/msg18179.html
XSLT related, see http://www.mail-archive.com/fop-users@xmlgraphics.apache.org/msg18190.html
batch transition to closed for remaining resolved bugs