aspose file tools*
The moose likes XML and Related Technologies and the fly likes How to get fo tags reconized? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "How to get fo tags reconized?" Watch "How to get fo tags reconized?" New topic
Author

How to get fo tags reconized?

joseph cooper
Ranch Hand

Joined: Nov 08, 2005
Posts: 44
The fo tags that I have added do not seem to be reconized. I can get an output without the formatting happening. What I am trying to do is create two parallel columns. Can anyone see anything that I have missed. Any help would be greatly appreciated.

<!-- code -->
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format">

<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
<fo:layout-master-set>
<fo:simple-page-master page-height="300mm" page-width="300mm" master-name="PageMaster">
<fo:region-body margin="" />
</fo:simple-page-master>
</fo:layout-master-set>

<fo:page-sequence master-reference="PageMaster">
<fo:flow flow-name="xsl-region-body">
<fo:table table-layout="fixed" width="100mm">
<fo:table-column column-number="1" column-width="75mm"/>
<fo:table-column column-number="2" column-width="50mm"/>
<fo:table-body>
<xsl:for-each select="distinctphysician">
<fo:table-row>
<fo:table-cell text-align="left">
<xsl:for-each select="col1">
<fo:block>
<xsl:value-of select="$newlineChar"/>
<xsl:value-of select="physician"/>
<xsl:value-of select="$newlineChar"/>
<xsl:value-of select="speciality"/>
<xsl:value-of select="$newlineChar"/>
</fo:block>
</xsl:for-each>
<fo:block/>
</fo:table-cell>
<fo:table-cell text-align="left">
<xsl:for-each select="col2">
<fo:block>
<xsl:value-of select="drugname"/>
<xsl:value-of select="$newlineChar"/>
</fo:block>
</xsl:for-each>
<fo:block/>
</fo:table-cell>
</fo:table-row>
</xsl:for-each>
</fo:table-body>
</fo:table>
</fo:flow>
</fo:page-sequence>
</fo:root>

<!-- output -->
Harper, John MD
Internal Medicine
Calan

Smith, Bob MD
Cardiologist
Coumadin
Jantoven
Lortab
Moban
Noxafil
Valium
Valtrex
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12806
    
    5
1. You should also tell us the FO processor you are using, there are several, with multiple versions.
2. What does "I can get an output without the formatting happening." mean exactly? Is all the source text in the resulting document or is some not rendered?

Bill
joseph cooper
Ranch Hand

Joined: Nov 08, 2005
Posts: 44
1. I found a xmlparserv2.jar.
2. I can get the output listed. It seems the fo tags are being ignored. The output is displaying name, speciality, and a list of drugs all on different lines. What I was looking for was two columns displaying something like this:



Hopefully these code tags will display the two columns.

3. Not all the source code is there. This is a massively huge xsl document. I had added in xmlns:fo="http://www.w3.org/1999/XSL/Format" in the xsl:stylesheet version="1.0" line and the fo tags down in the code where I needed the formatting to happen.

I am a relative newbie to xsl so I hope that I have answered these questions correctly.
joseph cooper
Ranch Hand

Joined: Nov 08, 2005
Posts: 44
It looks like the xmlparserv2 (2002) was upgraded to xerces parser (2004).
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12806
    
    5
1. I found a xmlparserv2.jar.


A little google searching indicates that xmlparserv2 is an Oracle thing. I am only familiar with the Apache FOP and the iText pdf formatters. If your formatter is not recognizing standard FO tags, thats an implementation idiosyncrasy (FOP has some too).

Unless somebody reading this forum also uses the Oracle formatter, your best bet is Oracle tech support.

Bill
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to get fo tags reconized?