You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-dev@xmlgraphics.apache.org by Norman Walsh <nd...@nwalsh.com> on 2000/11/29 15:02:03 UTC

DocBook support + error message patch

Using fop from CVS as of yesterday, I'm happy to report that, for
simple documents at least, the FOs produced by my DocBook XSL
stylesheets don't crash fop. (They do generate a bunch of warnings
about property values, but I think that's ok; that is, I think my
properties and values are legitimate and the warnings just mean FOP
doesn't support them yet.)

Finding some of the errors in my stylesheets would have been nearly
impossible without the following patch. I humbly suggest that it be
checked in :-)

Index: LayoutMasterSet.java
===================================================================
RCS file: /home/cvspublic/xml-fop/src/org/apache/fop/fo/pagination/LayoutMasterSet.java,v
retrieving revision 1.8
diff -c -2 -r1.8 LayoutMasterSet.java
*** LayoutMasterSet.java	2000/11/17 10:18:28	1.8
--- LayoutMasterSet.java	2000/11/29 14:01:28
***************
*** 103,107 ****
  	// check against duplication of master-name
  	if (existsName(simplePageMaster.getMasterName()))
! 		throw new FOPException( "'master-name' must be unique" +
  			"across page-masters and page-sequence-masters" );
  	this.simplePageMasters.put(simplePageMaster.getMasterName(), simplePageMaster);
--- 103,109 ----
  	// check against duplication of master-name
  	if (existsName(simplePageMaster.getMasterName()))
! 		throw new FOPException( "'master-name' (" +
! 			simplePageMaster.getMasterName() +
! 			") must be unique " +
  			"across page-masters and page-sequence-masters" );
  	this.simplePageMasters.put(simplePageMaster.getMasterName(), simplePageMaster);
***************
*** 117,121 ****
  	// check against duplication of master-name	
  	if (existsName(masterName))
! 		throw new FOPException( "'master-name' must be unique " +
  			"across page-masters and page-sequence-masters" );
  	this.pageSequenceMasters.put(masterName, pageSequenceMaster);
--- 119,125 ----
  	// check against duplication of master-name	
  	if (existsName(masterName))
! 		throw new FOPException( "'master-name' (" +
! 			masterName +
! 			") must be unique " +
  			"across page-masters and page-sequence-masters" );
  	this.pageSequenceMasters.put(masterName, pageSequenceMaster);
***************
*** 156,161 ****
  		    String localClass = (String)allRegions.get(region.getRegionName());
  		    if (!localClass.equals(region.getRegionClass())) {
! 			throw new FOPException("Duplicate region-names must map "
! 					       + "to the same region-class");
  		    }
  		}
--- 160,171 ----
  		    String localClass = (String)allRegions.get(region.getRegionName());
  		    if (!localClass.equals(region.getRegionClass())) {
! 			throw new FOPException("Duplicate region-names (" +
! 					       region.getRegionName() +
! 					       ") must map "
! 					       + "to the same region-class ("
! 					       + localClass
! 					       + "!="
! 					       + region.getRegionClass()
! 					       + ")");
  		    }
  		}


                                        Be seeing you,
                                          norm

-- 
Norman.Walsh@East.Sun.COM | The stone fell on the pitcher? Woe to the
XML Technology Center     | pitcher. The pitcher fell on the stone? Woe
Sun Microsystems, Inc.    | to the pitcher.--Rabbinic Saying