Focal Point
Schema Definition for Focus XML

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/1851034481

September 07, 2006, 07:01 AM
Werner Mayer
Schema Definition for Focus XML
Has anybody got the schema definition (dtd) for the focus xml output (ON TABLE HOLD FORMAT XML)? I was not able to find it anywhere on techsupport or the forum.

Thanks,
Werner

Prod: WebFOCUS 7.1.1 - Self Service - W2K3 - IIS 6.0
Devl: WebFOCUS 7.1.1 - Self Service - W2K3 - IIS 6.0
September 07, 2006, 10:56 AM
Tony A
Werner,

Are you wanting the dtd to be able to build an xsl file? or some other reason?

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
September 07, 2006, 11:29 AM
Werner Mayer
Hi Tony,

A customer requests an xml output format for further processing and aks for the schema of the focus xml, that's the reason. So i thought it might already exist out there.

Thanks
Werner

Prod: WebFOCUS 7.1.1 - Self Service - W2K3 - IIS 6.0
Devl: WebFOCUS 7.1.1 - Self Service - W2K3 - IIS 6.0
September 07, 2006, 11:37 AM
Tony A
Werner,

Sorry but I don't have a dtd for it but did have an xsl that I used once for an example. You're quite welcome to have that if you want - but no dtd I'm afraid Frowner

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
September 08, 2006, 04:10 AM
Werner Mayer
Tony,

That would be nice, you can reach me at werner.mayer@r-solution.at. But i'm still looking for the dtd as well.

Thanks
Werner

Prod: WebFOCUS 7.1.1 - Self Service - W2K3 - IIS 6.0
Devl: WebFOCUS 7.1.1 - Self Service - W2K3 - IIS 6.0
September 08, 2006, 05:11 AM
Tony A
Werner,

Easy enough to add it here Smiler

XSL
<xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl">

<xsl:template match="/">
  <HTML>
    <HEAD>
      <TITLE>Created by WebFOCUS from <xsl:value-of select="fxf/report/target/@destination"/></TITLE>
    </HEAD>
    <BODY scroll="auto" border="0" oncontextmenu="return false;">
      <table border="1" bgcolor="#8b808b">
        <xsl:apply-templates select="fxf/report/column_desc"/>
        <xsl:apply-templates select="fxf/report/table"/>
      </table>
    </BODY>
  </HTML>
</xsl:template>

<xsl:template match="column_desc">
      <tr bgcolor="#6495ED">
      <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="#ffdd33">
	<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="."/>
        </td>
	<xsl:if test="td"><xsl:apply-templates/></xsl:if>
</xsl:template>

</xsl:stylesheet>


Sample Fex{code]-* File xml_sample.fex
SET HOLDLIST = PRINTONLY
FILEDEF XMLTEST DISK XMLTEST.HTM
-RUN

-WRITE XMLTEST

FILEDEF XMLTEST DISK XMLTEST.HTM ( APPEND
-RUN

TABLE FILE CAR
SUM RCOST/D12.2!D AS 'Retail,Cost'
DCOST/D12.2!D AS 'Dealer,Cost'
BY COUNTRY AS 'Country,of Origin'
BY CAR AS 'Manufacturer'
BY MODEL AS 'Model'
ON TABLE SAVE AS XMLTEST FORMAT XML
END
-RUN

-HTMLFORM BEGIN
!IBI.FIL.XMLTEST;
-HTMLFORM END[/code]

Note that I wrote this for version 5.3.2 and haven't had time to check it in later versions.
T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
March 23, 2007, 09:52 AM
Suzanne
Just wondering if anyone has this schema now...

Has anybody got the schema definition (dtd) for the focus xml output (ON TABLE HOLD FORMAT XML)?

Thanks,
Suzanne


WF 766
Win2K
April 17, 2007, 08:14 AM
Werner Mayer
Hi, finally i got the DTD:


< !ELEMENT fxf [report, xsl*) >

< !ATTLIST fxf version CDATA #REQUIRED >
< !ATTLIST fxf data [hold | report | olap) "hold">
< !ELEMENT report [target, column_desc, table) >
< !ATTLIST report records CDATA #REQUIRED >
< !ATTLIST report lines CDATA #REQUIRED >
< !ATTLIST report columns CDATA #REQUIRED >
< !ATTLIST report rows CDATA #REQUIRED >
< !ELEMENT target EMPTY >
< !ATTLIST target format CDATA #IMPLIED >
< !ATTLIST target version CDATA #IMPLIED >
< !ATTLIST target type CDATA #IMPLIED >
< !ATTLIST target destination CDATA #IMPLIED >
< !ELEMENT text [#PCDATA) >
< !ELEMENT column_desc [col+) >
< !ELEMENT col [colhead*) >
< !ATTLIST col colnum ID #REQUIRED >
< !ATTLIST col fieldname CDATA #REQUIRED >
< !ATTLIST col alias CDATA #IMPLIED >
< !ATTLIST col datatype CDATA #REQUIRED >
< !ATTLIST col width CDATA #IMPLIED >
< !ATTLIST col focus_format CDATA #REQUIRED >
< !ATTLIST col description CDATA #IMPLIED >
< !ATTLIST col accept CDATA #IMPLIED >
< !ATTLIST col help_message CDATA #IMPLIED >
< !ATTLIST col title CDATA #IMPLIED >
< !ATTLIST col within CDATA #IMPLIED >
< !ATTLIST col property CDATA #IMPLIED >
< !ATTLIST col reference CDATA #IMPLIED >
< !ATTLIST col valign [left | center | right) "left">
< !ELEMENT colhead [text) >
< !ATTLIST colhead line CDATA #REQUIRED >
< !ELEMENT table [tr+) >
< !ELEMENT tr [td+) >
< !ATTLIST tr linetype CDATA #REQUIRED >
< !ATTLIST tr linenum CDATA #REQUIRED >
< !ELEMENT td [#PCDATA) >
< !ATTLIST td colnum IDREF #REQUIRED >
< !ATTLIST td rawvalue CDATA #IMPLIED >


greets,
werner
April 17, 2007, 03:04 PM
KevinG
Also,
Check this link to a recent post.

https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/1681094022?r=6771029122#6771029122  


Kevin


WF 7.6.10 / WIN-AIX