Re: commit: XSL-FO


Subject: Re: commit: XSL-FO
From: Sam TH (sam@uchicago.edu)
Date: Fri Apr 13 2001 - 01:29:07 CDT


On Fri, Apr 13, 2001 at 01:14:57AM -0400, Dom Lachowicz wrote:
> For all of you XSL-FO fans out there, I've gone and written an exporter
> which (I think) is conforming. All that I think that we need to still do is
> lists, and that won't be too hard once I fully comprehend the spec :)
>
> I'd like people to bang on this if you're familiar with the spec at all or
> know of any validators.

Well, I validated the documents you sent me, and the following patch
corrects the errors I found.

In order, the changes are:

- fo:simple-page-master wasn't supposed to be an empty element here.

- close fo:layout-master-set

- add FIXME to help grep

- give fo:flow a flow-name, as required

- use fo:inline, not fo:character. fo:character is for single
characters.

I would commit this myself, but I can't test it, due to spelling
lossage currently. :-(

Index: xp/ie_exp_XSL-FO.cpp
===================================================================
RCS file: /cvsroot/abi/src/wp/impexp/xp/ie_exp_XSL-FO.cpp,v
retrieving revision 1.6
diff -u -r1.6 ie_exp_XSL-FO.cpp
--- xp/ie_exp_XSL-FO.cpp 2001/04/13 04:30:53 1.6
+++ xp/ie_exp_XSL-FO.cpp 2001/04/13 06:13:38
@@ -444,9 +444,10 @@
 
         m_pie->write(" master-name=\"first\"");
 
- m_pie->write("/>\n");
+ m_pie->write(">\n");
         m_pie->write("\t<fo:region-body/>\n");
         m_pie->write("</fo:simple-page-master>\n\n");
+ m_pie->write("</fo:layout-master-set>\n\n");
 
         setlocale (LC_NUMERIC, old_locale);
 
@@ -463,7 +464,7 @@
         for (UT_uint32 k=0; (m_pDocument->enumDataItems(k,NULL,&szName,&pByteBuf,(void**)&szMimeType)); k++)
         {
           FILE *fp;
- char fname [1024]; // EVIL EVIL bad hardcoded buffer size
+ char fname [1024]; // FIXME EVIL EVIL bad hardcoded buffer size
           
           if (!UT_strcmp(szMimeType, "image/svg-xml"))
               sprintf(fname, "%s-%d.svg", m_pie->getFileName(), k);
@@ -501,7 +502,7 @@
         m_bInSection = true;
 
         m_pie->write("<fo:page-sequence master-name=\"first\">\n");
- m_pie->write("<fo:flow>\n");
+ m_pie->write("<fo:flow flow-name\"section\">\n");
 }
 
 #define BLOCK() do {if(block) m_pie->write(" "); else m_pie->write(" "); block = true;} while (0)
@@ -679,7 +680,7 @@
         // keep track of whether we've written out anything
         bool span = false;
 
- m_pie->write("<fo:character");
+ m_pie->write("<fo:inline");
 
         // query and output properties
         if (bHaveProp && pAP)
@@ -822,7 +823,7 @@
 
         m_bInSpan = false;
 
- m_pie->write("</fo:character>");
+ m_pie->write("</fo:inline>");
 }
 
 /*****************************************************************/

           
sam th --- sam@uchicago.edu --- http://www.abisource.com/~sam/
OpenPGP Key: CABD33FC --- http://samth.dyndns.org/key
DeCSS: http://samth.dyndns.org/decss




This archive was generated by hypermail 2b25 : Fri Apr 13 2001 - 01:18:03 CDT