vmote       2003/07/12 20:16:12

  Modified:    src/java/org/apache/fop/extensions
                        ExtensionElementMapping.java
               src/java/org/apache/fop/fo/expr AbsFunction.java
                        BodyStartFunction.java FopPropValFunction.java
                        FromParentFunction.java
                        FromTableColumnFunction.java Function.java
                        FunctionBase.java InheritedPropFunction.java
                        LabelEndFunction.java MaxFunction.java
                        MinFunction.java NCnameProperty.java
                        NearestSpecPropFunction.java Numeric.java
                        PPColWidthFunction.java PropertyException.java
                        PropertyInfo.java
  Log:
  style changes only
  
  Revision  Changes    Path
  1.3       +16 -10    
xml-fop/src/java/org/apache/fop/extensions/ExtensionElementMapping.java
  
  Index: ExtensionElementMapping.java
  ===================================================================
  RCS file: 
/home/cvs/xml-fop/src/java/org/apache/fop/extensions/ExtensionElementMapping.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ExtensionElementMapping.java      12 Jul 2003 21:22:03 -0000      1.2
  +++ ExtensionElementMapping.java      13 Jul 2003 03:16:11 -0000      1.3
  @@ -3,34 +3,34 @@
    * ============================================================================
    *                    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
  @@ -42,12 +42,12 @@
    * (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/>.
  - */ 
  + */
   package org.apache.fop.extensions;
   
   import org.apache.fop.fo.FONode;
  @@ -62,10 +62,16 @@
    */
   public class ExtensionElementMapping extends ElementMapping {
   
  +    /**
  +     * Constructor.
  +     */
       public ExtensionElementMapping() {
           URI = "http://xml.apache.org/fop/extensions";;
       }
   
  +    /**
  +     * Initialize the data structures.
  +     */
       protected void initialize() {
           if (foObjs == null) {
               foObjs = new HashMap();
  
  
  
  1.2       +24 -11    xml-fop/src/java/org/apache/fop/fo/expr/AbsFunction.java
  
  Index: AbsFunction.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/expr/AbsFunction.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- AbsFunction.java  11 Mar 2003 13:05:26 -0000      1.1
  +++ AbsFunction.java  13 Jul 2003 03:16:11 -0000      1.2
  @@ -3,34 +3,34 @@
    * ============================================================================
    *                    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
  @@ -42,29 +42,42 @@
    * (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/>.
  - */ 
  + */
   package org.apache.fop.fo.expr;
   
   import org.apache.fop.fo.Property;
   
  +/**
  + * Class modelling the abs Number Function. See Sec. 5.10.1 of the XSL-FO spec.
  + */
   public class AbsFunction extends FunctionBase {
   
  +    /**
  +     * @return 1 (the number of arguments required for the abs function)
  +     */
       public int nbArgs() {
           return 1;
       }
   
  +    /**
  +     * @param args array of arguments to be evaluated, the first of which
  +     * should be a numeric value
  +     * @param propInfo the PropertyInfo object to be evaluated
  +     * @return the absolute value of the input
  +     * @throws PropertyException for non-numeric input
  +     */
       public Property eval(Property[] args,
                            PropertyInfo propInfo) throws PropertyException {
           Numeric num = args[0].getNumeric();
           if (num == null) {
               throw new PropertyException("Non numeric operand to abs function");
           }
  -        // What if has relative composants (percent, table-col units)?
  +        // TODO: What if it has relative components (percent, table-col units)?
           return new NumericProperty(num.abs());
       }
   
  
  
  
  1.2       +24 -10    xml-fop/src/java/org/apache/fop/fo/expr/BodyStartFunction.java
  
  Index: BodyStartFunction.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/expr/BodyStartFunction.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- BodyStartFunction.java    11 Mar 2003 13:05:26 -0000      1.1
  +++ BodyStartFunction.java    13 Jul 2003 03:16:11 -0000      1.2
  @@ -3,34 +3,34 @@
    * ============================================================================
    *                    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
  @@ -42,24 +42,38 @@
    * (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/>.
  - */ 
  + */
   package org.apache.fop.fo.expr;
   
   import org.apache.fop.fo.Property;
   import org.apache.fop.fo.FONode;
   import org.apache.fop.fo.flow.ListItem;
   
  +/**
  + * Class corresponding to the body-start Property Value function. See Sec.
  + * 5.10.4 of the XSL-FO spec.
  + */
   public class BodyStartFunction extends FunctionBase {
   
  +    /**
  +     * @return 0 (there are no arguments for body-start)
  +     */
       public int nbArgs() {
           return 0;
       }
   
  +    /**
  +     * @param args array of arguments (none are used, but this is required by
  +     * the Function interface)
  +     * @param pInfo PropertyInfo object to be evaluated
  +     * @return numeric object containing the calculated body-start value
  +     * @throws PropertyException if called from outside of an fo:list-item
  +     */
       public Property eval(Property[] args,
                            PropertyInfo pInfo) throws PropertyException {
           Numeric distance =
  
  
  
  1.2       +23 -11    xml-fop/src/java/org/apache/fop/fo/expr/FopPropValFunction.java
  
  Index: FopPropValFunction.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/expr/FopPropValFunction.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- FopPropValFunction.java   11 Mar 2003 13:05:26 -0000      1.1
  +++ FopPropValFunction.java   13 Jul 2003 03:16:11 -0000      1.2
  @@ -3,34 +3,34 @@
    * ============================================================================
    *                    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
  @@ -42,26 +42,38 @@
    * (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/>.
  - */ 
  + */
   package org.apache.fop.fo.expr;
   
   import org.apache.fop.fo.Property;
   
   
   /**
  - * Return the specified or initial value of the property on this object.
  + * This appearst to be an artificial function (??), which handles the specified
  + * or initial value of the property on this object.
    */
   public class FopPropValFunction extends FunctionBase {
   
  +    /**
  +     * @return 1 (the maximum number of arguments)
  +     */
       public int nbArgs() {
           return 1;
       }
   
  +    /**
  +     *
  +     * @param args array of arguments, which should either be empty, or the
  +     * first of which should be an NCName corresponding to a property name
  +     * @param pInfo PropertyInfo object to be evaluated
  +     * @return the Property corresponding to the input
  +     * @throws PropertyException for incorrect parameters
  +     */
       public Property eval(Property[] args,
                            PropertyInfo pInfo) throws PropertyException {
           String propName = args[0].getString();
  
  
  
  1.2       +24 -11    xml-fop/src/java/org/apache/fop/fo/expr/FromParentFunction.java
  
  Index: FromParentFunction.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/expr/FromParentFunction.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- FromParentFunction.java   11 Mar 2003 13:05:26 -0000      1.1
  +++ FromParentFunction.java   13 Jul 2003 03:16:11 -0000      1.2
  @@ -3,34 +3,34 @@
    * ============================================================================
    *                    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
  @@ -42,23 +42,36 @@
    * (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/>.
  - */ 
  + */
   package org.apache.fop.fo.expr;
   
   import org.apache.fop.fo.Property;
   
  -
  +/**
  + * Class modelling the from-parent Property Value function. See Sec. 5.10.4 of
  + * the XSL-FO spec.
  + */
   public class FromParentFunction extends FunctionBase {
   
  +    /**
  +     * @return 1 (maximum arguments for the from-parent function)
  +     */
       public int nbArgs() {
           return 1;
       }
   
  +    /**
  +     * @param args array of arguments, which should either be empty, or the
  +     * first of which should contain an NCName corresponding to property name
  +     * @param pInfo PropertyInfo object to be evaluated
  +     * @return property containing the computed value
  +     * @throws PropertyException if the arguments are incorrect
  +     */
       public Property eval(Property[] args,
                            PropertyInfo pInfo) throws PropertyException {
           String propName = args[0].getString();
  
  
  
  1.2       +27 -11    
xml-fop/src/java/org/apache/fop/fo/expr/FromTableColumnFunction.java
  
  Index: FromTableColumnFunction.java
  ===================================================================
  RCS file: 
/home/cvs/xml-fop/src/java/org/apache/fop/fo/expr/FromTableColumnFunction.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- FromTableColumnFunction.java      11 Mar 2003 13:05:26 -0000      1.1
  +++ FromTableColumnFunction.java      13 Jul 2003 03:16:11 -0000      1.2
  @@ -3,34 +3,34 @@
    * ============================================================================
    *                    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
  @@ -42,23 +42,39 @@
    * (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/>.
  - */ 
  + */
   package org.apache.fop.fo.expr;
   
   import org.apache.fop.fo.Property;
   
  -
  +/**
  + * Class modelling the from-table-column Property Value function. See Sec.
  + * 5.10.4 of the XSL-FO spec.
  + */
   public class FromTableColumnFunction extends FunctionBase {
   
  +    /**
  +     * @return 1 (maximum argumenst for the from-table-column function)
  +     */
       public int nbArgs() {
           return 1;
       }
   
  +    /**
  +     *
  +     * @param args array of arguments, which should either be empty, or the
  +     * first of which should contain an NCName corresponding to a property name
  +     * @param pInfo PropertyInfo object to be evaluated
  +     * @return the Property corresponding to the property name specified, or, if
  +     * none, for the property for which the expression is being evaluated
  +     * @throws PropertyException for incorrect arguments, and (for now) in all
  +     * cases, because this function is not implemented
  +     */
       public Property eval(Property[] args,
                            PropertyInfo pInfo) throws PropertyException {
           String propName = args[0].getString();
  
  
  
  1.2       +31 -10    xml-fop/src/java/org/apache/fop/fo/expr/Function.java
  
  Index: Function.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/expr/Function.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Function.java     11 Mar 2003 13:05:26 -0000      1.1
  +++ Function.java     13 Jul 2003 03:16:11 -0000      1.2
  @@ -3,34 +3,34 @@
    * ============================================================================
    *                    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
  @@ -42,20 +42,41 @@
    * (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/>.
  - */ 
  + */
   package org.apache.fop.fo.expr;
   
   import org.apache.fop.fo.Property;
   import org.apache.fop.datatypes.PercentBase;
   
  +/**
  + * Interface for managing XSL-FO Functions
  + */
   public interface Function {
  +
  +    /**
  +     * @return the number of arguments that must be passed to this function. For
  +     * example, if the function should determine the minimum of two numbers, it
  +     * must be passed two arguments, one for each of the two values.
  +     */
       int nbArgs();
  +
  +    /**
  +     * @return the basis for percentage calculations
  +     */
       PercentBase getPercentBase();
  +
  +    /**
  +     * Evaluate the function
  +     * @param args an array of Properties that should be evaluated
  +     * @param propInfo the PropertyInfo
  +     * @return the Property satisfying the function
  +     * @throws PropertyException for problems when evaluating the function
  +     */
       Property eval(Property[] args,
                     PropertyInfo propInfo) throws PropertyException;
   }
  
  
  
  1.2       +14 -16    xml-fop/src/java/org/apache/fop/fo/expr/FunctionBase.java
  
  Index: FunctionBase.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/expr/FunctionBase.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- FunctionBase.java 11 Mar 2003 13:05:26 -0000      1.1
  +++ FunctionBase.java 13 Jul 2003 03:16:11 -0000      1.2
  @@ -3,34 +3,34 @@
    * ============================================================================
    *                    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
  @@ -42,29 +42,27 @@
    * (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/>.
  - */ 
  + */
   package org.apache.fop.fo.expr;
   
   import org.apache.fop.datatypes.PercentBase;
   
  +/**
  + * Abstract Base class for XSL-FO functions
  + */
   public abstract class FunctionBase implements Function {
  -    // abstract int nbArgs() ;
   
       /**
  -     * By default, functions have no percent-based arguments.
  +     * @return null (by default, functions have no percent-based arguments)
        */
       public PercentBase getPercentBase() {
           return null;
       }
   
  -    /*
  -     * abstract Property eval(Property[] args, PropertyInfo propInfo)
  -     * throws PropertyException;
  -     */
   }
   
  
  
  
  1.2       +25 -11    
xml-fop/src/java/org/apache/fop/fo/expr/InheritedPropFunction.java
  
  Index: InheritedPropFunction.java
  ===================================================================
  RCS file: 
/home/cvs/xml-fop/src/java/org/apache/fop/fo/expr/InheritedPropFunction.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- InheritedPropFunction.java        11 Mar 2003 13:05:26 -0000      1.1
  +++ InheritedPropFunction.java        13 Jul 2003 03:16:11 -0000      1.2
  @@ -3,34 +3,34 @@
    * ============================================================================
    *                    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
  @@ -42,23 +42,37 @@
    * (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/>.
  - */ 
  + */
   package org.apache.fop.fo.expr;
   
   import org.apache.fop.fo.Property;
   
  -
  +/**
  + * Class modelling the inherited-property-value Property Value function. See
  + * Sec. 5.10.4 of the XSL-FO standard.
  + */
   public class InheritedPropFunction extends FunctionBase {
   
  +    /**
  +     * @return 1 (maximum number of arguments for the inherited-property-value
  +     * function)
  +     */
       public int nbArgs() {
           return 1;
       }
   
  +    /**
  +     *
  +     * @param args arguments to be evaluated
  +     * @param pInfo PropertyInfo object to be evaluated
  +     * @return Property satisfying the inherited-property-value
  +     * @throws PropertyException for invalid parameter
  +     */
       public Property eval(Property[] args,
                            PropertyInfo pInfo) throws PropertyException {
           String propName = args[0].getString();
  
  
  
  1.2       +25 -10    xml-fop/src/java/org/apache/fop/fo/expr/LabelEndFunction.java
  
  Index: LabelEndFunction.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/expr/LabelEndFunction.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- LabelEndFunction.java     11 Mar 2003 13:05:26 -0000      1.1
  +++ LabelEndFunction.java     13 Jul 2003 03:16:11 -0000      1.2
  @@ -3,34 +3,34 @@
    * ============================================================================
    *                    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
  @@ -42,12 +42,12 @@
    * (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/>.
  - */ 
  + */
   package org.apache.fop.fo.expr;
   
   import org.apache.fop.datatypes.Length;
  @@ -59,12 +59,27 @@
   import org.apache.fop.fo.FONode;
   import org.apache.fop.fo.flow.ListItem;
   
  +/**
  + * Class modelling the label-end Property Value function. See Sec. 5.10.4 of the
  + * XSL-FO spec.
  + */
   public class LabelEndFunction extends FunctionBase {
   
  +    /**
  +     * @return 0 (the number of arguments required for the label-end function)
  +     */
       public int nbArgs() {
           return 0;
       }
   
  +    /**
  +     *
  +     * @param args array of arguments for the function (none are needed, but
  +     * required for the Function interface)
  +     * @param pInfo PropertyInfo object for the function
  +     * @return the calculated label-end value for the list
  +     * @throws PropertyException if called from outside of an fo:list-item
  +     */
       public Property eval(Property[] args,
                            PropertyInfo pInfo) throws PropertyException {
   
  
  
  
  1.2       +25 -12    xml-fop/src/java/org/apache/fop/fo/expr/MaxFunction.java
  
  Index: MaxFunction.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/expr/MaxFunction.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- MaxFunction.java  11 Mar 2003 13:05:26 -0000      1.1
  +++ MaxFunction.java  13 Jul 2003 03:16:11 -0000      1.2
  @@ -3,34 +3,34 @@
    * ============================================================================
    *                    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
  @@ -42,23 +42,36 @@
    * (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/>.
  - */ 
  + */
   package org.apache.fop.fo.expr;
   
   import org.apache.fop.fo.Property;
   
  -
  +/**
  + * Class for managing the "max" Number Function. See Sec. 5.10.1 in the XSL-FO
  + * standard.
  + */
   public class MaxFunction extends FunctionBase {
  +
  +    /**
  +     * @return 2 (the number of arguments required for the max function)
  +     */
       public int nbArgs() {
           return 2;
       }
   
  -    // Handle "numerics" if no proportional/percent parts!
  +    /**
  +     * Handle "numerics" if no proportional/percent parts
  +     * @param args array of arguments to be processed
  +     * @param pInfo PropertyInfo to be processed
  +     * @return the maximum of the two args elements passed
  +     * @throws PropertyException for invalid operands
  +     */
       public Property eval(Property[] args,
                            PropertyInfo pInfo) throws PropertyException {
           Numeric n1 = args[0].getNumeric();
  
  
  
  1.2       +25 -12    xml-fop/src/java/org/apache/fop/fo/expr/MinFunction.java
  
  Index: MinFunction.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/expr/MinFunction.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- MinFunction.java  11 Mar 2003 13:05:26 -0000      1.1
  +++ MinFunction.java  13 Jul 2003 03:16:11 -0000      1.2
  @@ -3,34 +3,34 @@
    * ============================================================================
    *                    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
  @@ -42,23 +42,36 @@
    * (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/>.
  - */ 
  + */
   package org.apache.fop.fo.expr;
   
   import org.apache.fop.fo.Property;
   
  -
  +/**
  + * Class for managing the "min" Number Function. See Sec. 5.10.1 in the XSL-FO
  + * standard.
  + */
   public class MinFunction extends FunctionBase {
  +
  +    /**
  +     * @return 2 (the number of arguments required for the min function)
  +     */
       public int nbArgs() {
           return 2;
       }
   
  -    // Handle "numerics" if no proportional/percent parts!
  +    /**
  +     * Handle "numerics" if no proportional/percent parts
  +     * @param args array of arguments to be processed
  +     * @param pInfo PropertyInfo to be processed
  +     * @return the minimum of the two args elements passed
  +     * @throws PropertyException for invalid operands
  +     */
       public Property eval(Property[] args,
                            PropertyInfo pInfo) throws PropertyException {
           Numeric n1 = args[0].getNumeric();
  
  
  
  1.2       +27 -12    xml-fop/src/java/org/apache/fop/fo/expr/NCnameProperty.java
  
  Index: NCnameProperty.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/expr/NCnameProperty.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- NCnameProperty.java       11 Mar 2003 13:05:26 -0000      1.1
  +++ NCnameProperty.java       13 Jul 2003 03:16:11 -0000      1.2
  @@ -3,34 +3,34 @@
    * ============================================================================
    *                    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
  @@ -42,37 +42,52 @@
    * (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/>.
  - */ 
  + */
   package org.apache.fop.fo.expr;
   
   import org.apache.fop.fo.Property;
   import org.apache.fop.datatypes.ColorType;
   
  +/**
  + * Class for handling NC Name objects
  + */
   public class NCnameProperty extends Property {
   
       private final String ncName;
   
  +    /**
  +     * Constructor
  +     * @param ncName string representing the ncName
  +     */
       public NCnameProperty(String ncName) {
           this.ncName = ncName;
       }
   
  +    /**
  +     * If a system color, return the corresponding value (appears to be
  +     * unimplemented)
  +     * @return ColorType object corresponding to the NCName
  +     * @throws PropertyException in all cases currently
  +     */
       public ColorType getColor() throws PropertyException {
  -        // If a system color, return the corresponding value
           throw new PropertyException("Not a Color");
       }
   
       /**
  -     * Return the name as a String (should be specified with quotes!)
  +     * @return the name as a String (should be specified with quotes!)
        */
       public String getString() {
           return this.ncName;
       }
   
  +    /**
  +     * @return ncName for this
  +     */
       public String getNCname() {
           return this.ncName;
       }
  
  
  
  1.2       +25 -10    
xml-fop/src/java/org/apache/fop/fo/expr/NearestSpecPropFunction.java
  
  Index: NearestSpecPropFunction.java
  ===================================================================
  RCS file: 
/home/cvs/xml-fop/src/java/org/apache/fop/fo/expr/NearestSpecPropFunction.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- NearestSpecPropFunction.java      11 Mar 2003 13:05:26 -0000      1.1
  +++ NearestSpecPropFunction.java      13 Jul 2003 03:16:11 -0000      1.2
  @@ -3,34 +3,34 @@
    * ============================================================================
    *                    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
  @@ -42,22 +42,37 @@
    * (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/>.
  - */ 
  + */
   package org.apache.fop.fo.expr;
   
   import org.apache.fop.fo.Property;
   
  +/**
  + * Class modelling the from-nearest-specified-value function. See Sec. 5.10.4
  + * of the XSL-FO standard.
  + */
   public class NearestSpecPropFunction extends FunctionBase {
   
  +    /**
  +     * @return 1 (maximum number of arguments for from-nearest-specified-value
  +     * function)
  +     */
       public int nbArgs() {
           return 1;
       }
   
  +    /**
  +     *
  +     * @param args array of arguments for the function
  +     * @param pInfo PropertyInfo for the function
  +     * @return Property containing the nearest-specified-value
  +     * @throws PropertyException for invalid arguments to the function
  +     */
       public Property eval(Property[] args,
                            PropertyInfo pInfo) throws PropertyException {
           String propName = args[0].getString();
  
  
  
  1.3       +16 -7     xml-fop/src/java/org/apache/fop/fo/expr/Numeric.java
  
  Index: Numeric.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/expr/Numeric.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Numeric.java      25 Apr 2003 07:06:43 -0000      1.2
  +++ Numeric.java      13 Jul 2003 03:16:11 -0000      1.3
  @@ -72,9 +72,13 @@
    */
   public class Numeric {
       // Bit fields
  -    public static final int ABS_LENGTH = 1;     // abs units (or number)
  -    public static final int PC_LENGTH = 2;      // Percentage
  -    public static final int TCOL_LENGTH = 4;    // Table units
  +
  +    /** constant for a length of absolute units (or number) */
  +    public static final int ABS_LENGTH = 1;
  +    /** constant for a percentage */
  +    public static final int PC_LENGTH = 2;
  +    /** constant for table units */
  +    public static final int TCOL_LENGTH = 4;
   
       private int valType;
       private double absValue;
  @@ -156,7 +160,7 @@
   
   
       /**
  -     * Return the current value as a Length if possible. This constructs
  +     * @return the current value as a Length if possible. This constructs
        * a new Length or Length subclass based on the current value type
        * of the Numeric.
        * If the stored value has a unit dimension other than 1, null
  @@ -187,13 +191,16 @@
       }
   
       /**
  -     * Return the current value as a Number if possible.
  +     * @return the current value as a Number if possible.
        * Calls asDouble().
        */
       public Number asNumber() {
           return asDouble();
       }
   
  +    /**
  +     * @return the current value as a Double
  +     */
       public Double asDouble() {
           if (dim == 0 && valType == ABS_LENGTH) {
               return new Double(absValue);
  @@ -365,7 +372,8 @@
       }
   
       /**
  -     * Return a Numeric which is the maximum of the current value and the
  +     * @param op the operand to which the current value should be compared
  +     * @return a Numeric which is the maximum of the current value and the
        * operand.
        * @throws PropertyException If the dimensions or value types of the
        * object and the operand are different.
  @@ -391,7 +399,8 @@
       }
   
       /**
  -     * Return a Numeric which is the minimum of the current value and the
  +     * @param op the operand to which the current value should be compared
  +     * @return a Numeric which is the minimum of the current value and the
        * operand.
        * @throws PropertyException If the dimensions or value types of the
        * object and the operand are different.
  
  
  
  1.2       +29 -11    xml-fop/src/java/org/apache/fop/fo/expr/PPColWidthFunction.java
  
  Index: PPColWidthFunction.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/expr/PPColWidthFunction.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- PPColWidthFunction.java   11 Mar 2003 13:05:26 -0000      1.1
  +++ PPColWidthFunction.java   13 Jul 2003 03:16:11 -0000      1.2
  @@ -3,34 +3,34 @@
    * ============================================================================
    *                    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
  @@ -42,12 +42,12 @@
    * (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/>.
  - */ 
  + */
   package org.apache.fop.fo.expr;
   
   
  @@ -55,17 +55,35 @@
   import org.apache.fop.fo.LengthProperty;
   import org.apache.fop.datatypes.TableColLength;
   
  +/**
  + * Class modelling the proportional-column-width function. See Sec. 5.10.4 of
  + * the XSL-FO standard.
  + */
   public class PPColWidthFunction extends FunctionBase {
   
  +    /**
  +     * @return 1 (the number of arguments for the proportional-column-width
  +     * function)
  +     */
       public int nbArgs() {
           return 1;
       }
   
  +    /**
  +     *
  +     * @param args array of arguments for this function
  +     * @param pInfo PropertyInfo for this function
  +     * @return numeric Property containing the units of proportional measure
  +     * for this column
  +     * @throws PropertyException for non-numeric operand, or if the parent
  +     * element is not a table-column
  +     */
       public Property eval(Property[] args,
                            PropertyInfo pInfo) throws PropertyException {
           Number d = args[0].getNumber();
           if (d == null) {
  -            throw new PropertyException("Non number operand to 
proportional-column-width function");
  +            throw new PropertyException("Non numeric operand to "
  +                    + "proportional-column-width function");
           }
           if (!pInfo.getPropertyList().getElement().equals("table-column")) {
               throw new PropertyException("proportional-column-width function "
  
  
  
  1.2       +18 -10    xml-fop/src/java/org/apache/fop/fo/expr/PropertyException.java
  
  Index: PropertyException.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/expr/PropertyException.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- PropertyException.java    11 Mar 2003 13:05:26 -0000      1.1
  +++ PropertyException.java    13 Jul 2003 03:16:11 -0000      1.2
  @@ -3,34 +3,34 @@
    * ============================================================================
    *                    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
  @@ -42,15 +42,23 @@
    * (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/>.
  - */ 
  + */
   package org.apache.fop.fo.expr;
   
  +/**
  + * Class for managing exceptions that are raised in Property processing.
  + */
   public class PropertyException extends Exception {
  +
  +    /**
  +     * Constructor
  +     * @param detail string containing the detail message
  +     */
       public PropertyException(String detail) {
           super(detail);
       }
  
  
  
  1.2       +32 -11    xml-fop/src/java/org/apache/fop/fo/expr/PropertyInfo.java
  
  Index: PropertyInfo.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/expr/PropertyInfo.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- PropertyInfo.java 11 Mar 2003 13:05:26 -0000      1.1
  +++ PropertyInfo.java 13 Jul 2003 03:16:11 -0000      1.2
  @@ -3,34 +3,34 @@
    * ============================================================================
    *                    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
  @@ -42,12 +42,12 @@
    * (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/>.
  - */ 
  + */
   package org.apache.fop.fo.expr;
   
   import java.util.Stack;
  @@ -70,6 +70,12 @@
       private FObj fo;
       private Stack stkFunction;    // Stack of functions being evaluated
   
  +    /**
  +     * Constructor
  +     * @param maker Property.Maker object
  +     * @param plist PropertyList object
  +     * @param fo FObj
  +     */
       public PropertyInfo(Property.Maker maker, PropertyList plist, FObj fo) {
           this.maker = maker;
           this.plist = plist;
  @@ -98,20 +104,32 @@
       }
   
       /**
  -     * Return the current font-size value as base units (milli-points).
  +     * @return the current font-size value as base units (milli-points).
        */
       public int currentFontSize() {
           return plist.get("font-size").getLength().getValue();
       }
   
  +    /**
  +     * accessor for FObj
  +     * @return FObj
  +     */
       public FObj getFO() {
           return fo;
       }
   
  +    /**
  +     * accessor for PropertyList
  +     * @return PropertyList object
  +     */
       public PropertyList getPropertyList() {
           return plist;
       }
   
  +    /**
  +     * push a function onto the function stack
  +     * @param func function to push onto stack
  +     */
       public void pushFunction(Function func) {
           if (stkFunction == null) {
               stkFunction = new Stack();
  @@ -119,6 +137,9 @@
           stkFunction.push(func);
       }
   
  +    /**
  +     * pop a function off of the function stack
  +     */
       public void popFunction() {
           if (stkFunction != null) {
               stkFunction.pop();
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to