* New: WebFOCUS 8 Info Center
* Visit the Higher Education Forums
* Visit the ESRI Forums
I've been asked to use WebFocus to generate XML (which I have completed using PCHOLD = XML) and then generate a PDF using XSLT. I have the XSLT coded. I am just stuck on getting either the XSLT to call the WebFocus XML report, or having the WebFocus XML report call the XSLT. I checked and we do not have the XML adapter. The ultimate goal is to circumvent the web developers and their JAVA/JSP/WebSphere tools....any suggestions?
Not 100% sure here, but don't you need a third party tool to perform the transformation? I would suggest getting a tool off the web that allows for XML source to be passed via a URL. The URL can then be http:\\server\ibi_apps\WFServlet?IBIF_ex=fexname...
Sorry, should have specified that we already have the parser software. We're already using XML/XSLT, though our web developer has used JAVA to control the processing of the XSLT. (Now I'm being "challenged" to use FOCUS/WebFocus to get the same result)
To be more specific, what I am looking to do, either in FOCUS or WebFocus, is to :
-run the report which generates a HOLD file in XML format (I have created this report in WebFocus)
-run the XSLT, which generates an FO file
-generate the PDF from the FO file
I know that I will need commands which will point to each of the components in the XML parser. I'm looking for some suggestions as to how I can call these outside processes. Any help is GREATLY appreciated.
I've not played too much with anything beyond the XSL application but can generate an XML file with an applied XSL using the following -
-* File xml_sample_1.FEX
FILEDEF XMLTEST DISK XMLTEST.HTM
-WRITE XMLTEST <?xml:stylesheet type="text/xsl" href="http://server/approot/baseapp/WebFOCUS.xsl"?>
FILEDEF XMLTEST DISK XMLTEST.HTM ( APPEND
TABLE FILE CAR
SUM RCOST DCOST
ON TABLE SAVE AS XMLTEST FORMAT XML
It may or may not work for you or even get you a bit further along the line.
Good luck and please post your eventual solution as I would be most interested.
In case anyone would like t
he xsl template to go with the above - here it is
<xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl"> <xsl:template match="/"> <TITLE>Created by WebFOCUS from <xsl:value-of select="fxf/report/target/@destination"/> </TITLE> <BODY scroll="auto" border="0" oncontextmenu="return false;"> <table border="0" bgcolor="#a0a5ff"> <xsl:apply-templates select="fxf/report/column_desc"/> <xsl:apply-templates select="fxf/report/table"/> </table> </xsl:template> <xsl:template match="column_desc"> <tr bgcolor="#a0a5ff"> <xsl:for-each select="col"> <td width="100"> <xsl:attribute name="align"> <xsl:value-of select="@valign"/> </xsl:attribute><xsl:value-of select="@title"/> </td> </xsl:for-each> </tr> </xsl:template> <xsl:template match="table"> <xsl:for-each select="tr"> <tr bgcolor="#f0f5ff"> <xsl:if test="td"><xsl:apply-templates/> </xsl:if> </tr> </xsl:for-each> </xsl:template> <xsl:template match="td"> <td> <xsl:if test="@rawvalue"> <xsl:attribute name="align">right </xsl:attribute> </xsl:if> <xsl:value-of select="."/> <xsl:if test="td"> <xsl:apply-templates/> </xsl:if> </xsl:template> </xsl:stylesheet>Very basic and may not
be to everyones exacting
standards but it's a start This message has been edited. Last edited by: <Mabel>,
|Powered by Social Strata|