Tech Doc Search Tech Support User Forums WebFOCUS Newsletter Summit Education

Go
New
Search
Notify
Tools
Reply
  
XML/XSLT in WebFocus
 Login/Join
 
<Lisa M>
posted
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? Smiler
 
Reply With QuoteReport This Post
Master
posted Hide Post
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...
 
Posts: 870 | Location: Toronto, Ontario | Registered: May 26, 2004Reply With QuoteReport This Post
<Lisa M>
posted
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.
 
Reply With QuoteReport This Post
Expert
posted Hide Post
Lisa,

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
-RUN

-WRITE XMLTEST <?xml:stylesheet type="text/xsl" href="http://server/approot/baseapp/WebFOCUS.xsl"?>

FILEDEF XMLTEST DISK XMLTEST.HTM ( APPEND
-RUN

TABLE FILE CAR
SUM RCOST DCOST
BY COUNTRY
BY MODEL
BY CAR
ON TABLE SAVE AS XMLTEST FORMAT XML
END
-RUN

-HTMLFORM BEGIN
!IBI.FIL.XMLTEST;
-HTMLFORM END


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.
 
Posts: 4406 | Location: United Kingdom | Registered: April 08, 2004Reply With QuoteReport This Post
Expert
posted Hide Post
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 Smiler

This message has been edited. Last edited by: <Mabel>,
 
Posts: 4406 | Location: United Kingdom | Registered: April 08, 2004Reply With QuoteReport This Post
  Powered by Social Strata  
 


Copyright © 1996-2014 Information Builders, leaders in enterprise business intelligence.