gmazza 2003/12/22 13:37:44 Modified: . build.xml src/codegen fo-property-mapping.xsl properties.xsl src/java/org/apache/fop/datatypes CondLength.java src/java/org/apache/fop/fo FObj.java Property.java PropertyList.java PropertyManager.java src/java/org/apache/fop/fo/flow Block.java TableRow.java src/java/org/apache/fop/fo/properties CommonBorderAndPadding.java src/java/org/apache/fop/layoutmgr PageLayoutManager.java src/java/org/apache/fop/render/rtf RTFHandler.java TableAttributesConverter.java TextAttributesConverter.java src/java/org/apache/fop/traits LayoutProps.java SpaceVal.java Added: src/codegen prop-val-enum-interfaces.xsl src/java/org/apache/fop/fo Constants.java Removed: src/codegen enumgen.xsl src/java/org/apache/fop/fo/properties Constants.java Log: 1.) renamed enumgen.xsl to longer but hopefully clearer prop-val-enum-interfaces.xsl 2.) Moved Constants.java from fo.properties to fo package, to reduce the need for layout and renderers to import directly from the properties package. Revision Changes Path 1.95 +1 -2 xml-fop/build.xml Index: build.xml =================================================================== RCS file: /home/cvs/xml-fop/build.xml,v retrieving revision 1.94 retrieving revision 1.95 diff -u -r1.94 -r1.95 --- build.xml 20 Dec 2003 17:40:01 -0000 1.94 +++ build.xml 22 Dec 2003 21:37:43 -0000 1.95 @@ -209,7 +209,6 @@ <property name="colorkw.xml" value="${build.codegen}/colorkw.xml"/> <property name="properties.xsl" value="${build.codegen}/properties.xsl"/> - <property name="enumgen.xsl" value="${build.codegen}/enumgen.xsl"/> <property name="propinc.xsl" value="${build.codegen}/propinc.xsl"/> <property name="src.charlist.xsl" value="${src.codegen}/code-point-mapping.xsl"/> <property name="encodings.xml" value="${build.codegen}/encodings.xml"/> @@ -355,7 +354,7 @@ out="${build.gensrc}/${replacestring}/fo/properties/fo_${ignore_this}"/> <style in="${foproperties.xml}" style="${build.codegen}/fo-property-mapping.xsl" out="${build.gensrc}/${replacestring}/fo/properties/FOPropertyMapping.java"/> - <style in="${foproperties.xml}" style="${enumgen.xsl}" + <style in="${foproperties.xml}" style="${build.codegen}/prop-val-enum-interfaces.xsl" out="${build.gensrc}/${replacestring}/fo/properties/foenums_${ignore_this}"/> <style in="${encodings.xml}" style="${charlist.xsl}" out="${build.gensrc}/${replacestring}/fonts//CodePointMapping.java"/> 1.4 +2 -1 xml-fop/src/codegen/fo-property-mapping.xsl Index: fo-property-mapping.xsl =================================================================== RCS file: /home/cvs/xml-fop/src/codegen/fo-property-mapping.xsl,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- fo-property-mapping.xsl 22 Dec 2003 03:53:31 -0000 1.3 +++ fo-property-mapping.xsl 22 Dec 2003 21:37:43 -0000 1.4 @@ -104,6 +104,7 @@ import java.util.HashMap; import java.util.Set; +import org.apache.fop.fo.Constants; import org.apache.fop.fo.Property; //import org.apache.fop.svg.*; 1.23 +2 -1 xml-fop/src/codegen/properties.xsl Index: properties.xsl =================================================================== RCS file: /home/cvs/xml-fop/src/codegen/properties.xsl,v retrieving revision 1.22 retrieving revision 1.23 diff -u -r1.22 -r1.23 --- properties.xsl 22 Dec 2003 03:53:31 -0000 1.22 +++ properties.xsl 22 Dec 2003 21:37:43 -0000 1.23 @@ -311,6 +311,7 @@ <redirect:write select="concat($classname, '.java')"> <xsl:text>package org.apache.fop.fo.properties; +import org.apache.fop.fo.Constants; </xsl:text> <xsl:if test=".//keyword-equiv or ./name[.='generic-color']"> <xsl:text> 1.1 xml-fop/src/codegen/prop-val-enum-interfaces.xsl Index: prop-val-enum-interfaces.xsl =================================================================== <!-- $Id: prop-val-enum-interfaces.xsl,v 1.1 2003/12/22 21:37:43 gmazza Exp $ ============================================================================ The Apache Software License, Version 1.1 ============================================================================ Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved. Redistribution and use in source and binary forms, with or without modifica- tion, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. The end-user documentation included with the redistribution, if any, must include the following acknowledgment: "This product includes software developed by the Apache Software Foundation (http://www.apache.org/)." Alternately, this acknowledgment may appear in the software itself, if and wherever such third-party acknowledgments normally appear. 4. The names "FOP" and "Apache Software Foundation" must not be used to endorse or promote products derived from this software without prior written permission. For written permission, please contact [EMAIL PROTECTED] 5. Products derived from this software may not be called "Apache", nor may "Apache" appear in their name, without prior written permission of the Apache Software Foundation. THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ============================================================================ This software consists of voluntary contributions made by many individuals on behalf of the Apache Software Foundation and was originally created by James Tauber <[EMAIL PROTECTED]>. For more information on the Apache Software Foundation, please see <http://www.apache.org/>. --> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:lxslt="http://xml.apache.org/xslt" xmlns:redirect="org.apache.xalan.xslt.extensions.Redirect" extension-element-prefixes="redirect"> <xsl:include href="./propinc.xsl"/> <xsl:output method="text" /> <!-- zap text content --> <xsl:template match="text()"/> <xsl:template match="property[not(@type='generic')]"> <xsl:variable name="classname"> <xsl:choose> <xsl:when test="class-name"> <xsl:value-of select="class-name"/> </xsl:when> <xsl:otherwise> <xsl:call-template name="makeClassName"> <xsl:with-param name="propstr" select="name"/> </xsl:call-template> </xsl:otherwise> </xsl:choose> </xsl:variable> <xsl:variable name="bEnum"> <xsl:call-template name="hasEnum"/> </xsl:variable> <xsl:variable name="bSubpropEnum"> <xsl:call-template name="hasSubpropEnum"/> </xsl:variable> <xsl:if test="$bEnum='true' or contains($bSubpropEnum, 'true')"> <redirect:write select="concat($classname, '.java')"> <xsl:text>package org.apache.fop.fo.properties; import org.apache.fop.fo.Constants; </xsl:text> <!-- Handle enumeration values --> <xsl:text> public interface </xsl:text> <xsl:value-of select="$classname"/> <xsl:if test="use-generic and $bEnum='true'"> <xsl:text> extends </xsl:text> <xsl:value-of select="use-generic"/> <xsl:text>.Enums</xsl:text> </xsl:if> <xsl:text> {</xsl:text> <xsl:for-each select="enumeration/value"> <xsl:text> int </xsl:text> <xsl:value-of select="@const"/> <xsl:text> = Constants.</xsl:text> <xsl:value-of select="@const"/> <xsl:text>;</xsl:text> </xsl:for-each> <xsl:if test="contains($bSubpropEnum, 'true')"> <xsl:call-template name="genSubpropEnum"/> </xsl:if> <xsl:text> } </xsl:text> </redirect:write> </xsl:if> </xsl:template> <xsl:template name="genSubpropEnum"> <xsl:param name="prop" select="."/> <xsl:choose> <xsl:when test="$prop/compound/subproperty/enumeration"> <xsl:for-each select="compound/subproperty[enumeration]"> <xsl:text> public interface </xsl:text> <xsl:value-of select="name"/> <xsl:text> { </xsl:text> <xsl:for-each select="enumeration/value"> <xsl:text> int </xsl:text> <xsl:value-of select="@const"/> <xsl:text> = Constants.</xsl:text> <xsl:value-of select="@const"/> <xsl:text>;</xsl:text> </xsl:for-each> <xsl:text> } </xsl:text> </xsl:for-each> </xsl:when> <xsl:when test="$prop/use-generic"> <xsl:call-template name="inhspenums"> <xsl:with-param name="prop" select="key('genericref', $prop/use-generic)"/> </xsl:call-template> </xsl:when> <xsl:when test="$prop/compound/subproperty/use-generic"> <!-- generate "interface <subprop> extends <gensubprop>.Enums" --> <xsl:for-each select="$prop/compound/subproperty[use-generic]"> <xsl:variable name="bSpEnum"> <xsl:call-template name="hasEnum"> <xsl:with-param name="prop" select="key('genericref', use-generic)"/> </xsl:call-template> </xsl:variable> <xsl:if test="$bSpEnum='true'"> <xsl:text> public interface </xsl:text> <xsl:value-of select="name"/> <xsl:text> extends </xsl:text> <xsl:value-of select="use-generic"/> <xsl:text>.Enums { } </xsl:text> </xsl:if> </xsl:for-each> </xsl:when> <xsl:otherwise> <xsl:text> false</xsl:text> </xsl:otherwise> </xsl:choose> </xsl:template> <xsl:template name="inhspenums"> <xsl:param name="prop"/> <xsl:variable name="generic_name"> <xsl:choose> <xsl:when test="$prop/class-name"> <xsl:value-of select="$prop/class-name"/> </xsl:when> <xsl:otherwise> <xsl:call-template name="makeClassName"> <xsl:with-param name="propstr" select="$prop/name"/> </xsl:call-template> </xsl:otherwise> </xsl:choose> </xsl:variable> <!-- generate "interface <subprop> extends <genprop>.<subprop>" --> <xsl:for-each select="$prop/compound/subproperty[enumeration]"> <xsl:variable name="spname"> <xsl:call-template name="makeClassName"> <xsl:with-param name="propstr" select="name"/> </xsl:call-template> </xsl:variable> <xsl:text> public interface </xsl:text> <xsl:value-of select="$spname"/> <xsl:text> extends </xsl:text> <xsl:value-of select="$generic_name"/> <xsl:text>.Enums.</xsl:text> <xsl:value-of select="$spname"/> <xsl:text> { }</xsl:text> </xsl:for-each> <xsl:if test="$prop/use-generic"> <xsl:call-template name="inhspenums"> <xsl:with-param name="prop" select="key('genericref', $prop/use-generic)"/> </xsl:call-template> </xsl:if> </xsl:template> </xsl:stylesheet> 1.2 +1 -1 xml-fop/src/java/org/apache/fop/datatypes/CondLength.java Index: CondLength.java =================================================================== RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/datatypes/CondLength.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- CondLength.java 11 Mar 2003 13:05:36 -0000 1.1 +++ CondLength.java 22 Dec 2003 21:37:43 -0000 1.2 @@ -51,7 +51,7 @@ package org.apache.fop.datatypes; import org.apache.fop.fo.Property; -import org.apache.fop.fo.properties.Constants; +import org.apache.fop.fo.Constants; /** * A space quantity in XSL (space-before, space-after). 1.25 +1 -1 xml-fop/src/java/org/apache/fop/fo/FObj.java Index: FObj.java =================================================================== RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/FObj.java,v retrieving revision 1.24 retrieving revision 1.25 diff -u -r1.24 -r1.25 --- FObj.java 22 Dec 2003 01:03:31 -0000 1.24 +++ FObj.java 22 Dec 2003 21:37:43 -0000 1.25 @@ -59,7 +59,7 @@ import org.apache.fop.apps.FOPException; import org.apache.fop.fo.flow.Marker; -import org.apache.fop.fo.properties.Constants; +import org.apache.fop.fo.Constants; import org.apache.fop.fo.properties.FOPropertyMapping; import org.xml.sax.Attributes; 1.5 +1 -1 xml-fop/src/java/org/apache/fop/fo/Property.java Index: Property.java =================================================================== RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/Property.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- Property.java 22 Dec 2003 03:53:31 -0000 1.4 +++ Property.java 22 Dec 2003 21:37:43 -0000 1.5 @@ -61,7 +61,7 @@ import org.apache.fop.fo.expr.Numeric; import org.apache.fop.fo.expr.PropertyParser; import org.apache.fop.fo.expr.PropertyInfo; -import org.apache.fop.fo.properties.Constants; +import org.apache.fop.fo.Constants; import org.apache.fop.fo.properties.FOPropertyMapping; import org.apache.fop.apps.FOPException; import java.util.Vector; 1.7 +1 -1 xml-fop/src/java/org/apache/fop/fo/PropertyList.java Index: PropertyList.java =================================================================== RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/PropertyList.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- PropertyList.java 22 Dec 2003 01:03:31 -0000 1.6 +++ PropertyList.java 22 Dec 2003 21:37:43 -0000 1.7 @@ -57,7 +57,7 @@ // FOP import org.apache.fop.apps.FOPException; import org.apache.fop.fo.Property.Maker; -import org.apache.fop.fo.properties.Constants; +import org.apache.fop.fo.Constants; import org.apache.fop.fo.properties.FOPropertyMapping; import org.apache.fop.fo.properties.WritingMode; 1.16 +1 -1 xml-fop/src/java/org/apache/fop/fo/PropertyManager.java Index: PropertyManager.java =================================================================== RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/PropertyManager.java,v retrieving revision 1.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- PropertyManager.java 20 Dec 2003 06:53:22 -0000 1.15 +++ PropertyManager.java 22 Dec 2003 21:37:43 -0000 1.16 @@ -67,7 +67,7 @@ import org.apache.fop.traits.InlineProps; import org.apache.fop.traits.SpaceVal; import org.apache.fop.traits.LayoutProps; // keep, break, span, space? -import org.apache.fop.fo.properties.Constants; +import org.apache.fop.fo.Constants; import org.apache.fop.fo.properties.Span; import org.apache.fop.fonts.FontMetrics; import org.apache.fop.fo.properties.CommonHyphenation; 1.3 +2 -2 xml-fop/src/java/org/apache/fop/fo/Constants.java 1.10 +1 -1 xml-fop/src/java/org/apache/fop/fo/flow/Block.java Index: Block.java =================================================================== RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/flow/Block.java,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- Block.java 20 Dec 2003 06:53:22 -0000 1.9 +++ Block.java 22 Dec 2003 21:37:44 -0000 1.10 @@ -62,7 +62,7 @@ import org.apache.fop.fo.FObjMixed; import org.apache.fop.fo.RecursiveCharIterator; import org.apache.fop.fo.FOTreeVisitor; -import org.apache.fop.fo.properties.Constants; +import org.apache.fop.fo.Constants; import org.apache.fop.fo.properties.CommonAccessibility; import org.apache.fop.fo.properties.CommonAural; import org.apache.fop.fo.properties.CommonBackground; 1.9 +1 -1 xml-fop/src/java/org/apache/fop/fo/flow/TableRow.java Index: TableRow.java =================================================================== RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/flow/TableRow.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- TableRow.java 20 Dec 2003 06:53:22 -0000 1.8 +++ TableRow.java 22 Dec 2003 21:37:44 -0000 1.9 @@ -61,7 +61,7 @@ import org.apache.fop.fo.FObj; import org.apache.fop.fo.Property; import org.apache.fop.fo.FOTreeVisitor; -import org.apache.fop.fo.properties.Constants; +import org.apache.fop.fo.Constants; import org.apache.fop.fo.properties.CommonAccessibility; import org.apache.fop.fo.properties.CommonAural; 1.4 +2 -1 xml-fop/src/java/org/apache/fop/fo/properties/CommonBorderAndPadding.java Index: CommonBorderAndPadding.java =================================================================== RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/properties/CommonBorderAndPadding.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- CommonBorderAndPadding.java 24 Nov 2003 19:07:35 -0000 1.3 +++ CommonBorderAndPadding.java 22 Dec 2003 21:37:44 -0000 1.4 @@ -50,6 +50,7 @@ */ package org.apache.fop.fo.properties; +import org.apache.fop.fo.Constants; import org.apache.fop.datatypes.ColorType; import org.apache.fop.datatypes.CondLength; 1.25 +1 -1 xml-fop/src/java/org/apache/fop/layoutmgr/PageLayoutManager.java Index: PageLayoutManager.java =================================================================== RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/layoutmgr/PageLayoutManager.java,v retrieving revision 1.24 retrieving revision 1.25 diff -u -r1.24 -r1.25 --- PageLayoutManager.java 20 Dec 2003 06:53:23 -0000 1.24 +++ PageLayoutManager.java 22 Dec 2003 21:37:44 -0000 1.25 @@ -81,7 +81,7 @@ import org.apache.fop.fo.properties.CommonBackground; import org.apache.fop.fo.properties.CommonBorderAndPadding; import org.apache.fop.fo.properties.CommonMarginBlock; -import org.apache.fop.fo.properties.Constants; +import org.apache.fop.fo.Constants; import org.apache.fop.fo.properties.Overflow; import java.util.ArrayList; 1.10 +2 -2 xml-fop/src/java/org/apache/fop/render/rtf/RTFHandler.java Index: RTFHandler.java =================================================================== RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/render/rtf/RTFHandler.java,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- RTFHandler.java 20 Dec 2003 06:53:23 -0000 1.9 +++ RTFHandler.java 22 Dec 2003 21:37:44 -0000 1.10 @@ -78,7 +78,7 @@ import org.apache.fop.fo.pagination.Flow; import org.apache.fop.fo.pagination.PageSequence; import org.apache.fop.fo.pagination.SimplePageMaster; -import org.apache.fop.fo.properties.Constants; +import org.apache.fop.fo.Constants; import org.apache.fop.fo.Property; import org.apache.fop.fo.LengthProperty; import org.apache.fop.apps.Document; 1.5 +2 -2 xml-fop/src/java/org/apache/fop/render/rtf/TableAttributesConverter.java Index: TableAttributesConverter.java =================================================================== RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/render/rtf/TableAttributesConverter.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- TableAttributesConverter.java 20 Dec 2003 06:53:23 -0000 1.4 +++ TableAttributesConverter.java 22 Dec 2003 21:37:44 -0000 1.5 @@ -59,7 +59,7 @@ import org.apache.fop.apps.FOPException; import org.apache.fop.fo.EnumProperty; import org.apache.fop.fo.expr.NCnameProperty; -import org.apache.fop.fo.properties.Constants; +import org.apache.fop.fo.Constants; import org.apache.fop.fo.LengthProperty; import org.apache.fop.fo.ListProperty; import org.apache.fop.fo.PropertyList; 1.6 +1 -1 xml-fop/src/java/org/apache/fop/render/rtf/TextAttributesConverter.java Index: TextAttributesConverter.java =================================================================== RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/render/rtf/TextAttributesConverter.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- TextAttributesConverter.java 20 Dec 2003 06:53:23 -0000 1.5 +++ TextAttributesConverter.java 22 Dec 2003 21:37:44 -0000 1.6 @@ -55,7 +55,7 @@ import org.apache.avalon.framework.logger.ConsoleLogger; import org.apache.fop.apps.FOPException; import org.apache.fop.fo.EnumProperty; -import org.apache.fop.fo.properties.Constants; +import org.apache.fop.fo.Constants; import org.apache.fop.fo.LengthProperty; import org.apache.fop.fo.PropertyList; import org.apache.fop.fo.SpaceProperty; 1.3 +1 -1 xml-fop/src/java/org/apache/fop/traits/LayoutProps.java Index: LayoutProps.java =================================================================== RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/traits/LayoutProps.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- LayoutProps.java 5 Nov 2003 23:48:47 -0000 1.2 +++ LayoutProps.java 22 Dec 2003 21:37:44 -0000 1.3 @@ -50,7 +50,7 @@ */ package org.apache.fop.traits; -import org.apache.fop.fo.properties.Constants; +import org.apache.fop.fo.Constants; /** * Store properties affecting layout: break-before, break-after, keeps, span. 1.4 +1 -1 xml-fop/src/java/org/apache/fop/traits/SpaceVal.java Index: SpaceVal.java =================================================================== RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/traits/SpaceVal.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- SpaceVal.java 5 Nov 2003 23:48:47 -0000 1.3 +++ SpaceVal.java 22 Dec 2003 21:37:44 -0000 1.4 @@ -53,7 +53,7 @@ import org.apache.fop.datatypes.Space; import org.apache.fop.fo.Property; -import org.apache.fop.fo.properties.Constants; +import org.apache.fop.fo.Constants; /** * Store a single Space property value in simplified form, with all
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]