From 30abb837a47eca73843e095e30c03a4ddcb2054a Mon Sep 17 00:00:00 2001 From: Peter Bernard West Date: Sun, 15 Sep 2002 05:50:05 +0000 Subject: [PATCH] Changed to extend IndirectValue git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/FOP_0-20-0_Alt-Design@195190 13f79535-47bb-0310-9956-ffa450edef68 --- .../fop/datatypes/FromNearestSpecified.java | 28 ++++++++----------- src/org/apache/fop/datatypes/FromParent.java | 27 ++++++++---------- 2 files changed, 23 insertions(+), 32 deletions(-) diff --git a/src/org/apache/fop/datatypes/FromNearestSpecified.java b/src/org/apache/fop/datatypes/FromNearestSpecified.java index 27f7d94c6..d2479f25c 100644 --- a/src/org/apache/fop/datatypes/FromNearestSpecified.java +++ b/src/org/apache/fop/datatypes/FromNearestSpecified.java @@ -1,33 +1,28 @@ package org.apache.fop.datatypes; -import org.apache.fop.fo.expr.AbstractPropertyValue; +import org.apache.fop.datatypes.IndirectValue; import org.apache.fop.fo.expr.PropertyValue; import org.apache.fop.fo.expr.PropertyException; import org.apache.fop.fo.Properties; /* - * FromNearestSpecified.java - *
* $Id$ - *
* Copyright (C) 2001 The Apache Software Foundation. All rights reserved. * For details on use and redistribution please refer to the * LICENSE file included with these sources. */ /** - *

- * A pseudo-class to represent a call to the core property value function - * from-nearest-specified-value(), only in the cases where the property + * A pseudo-class to represent a call to the core function + * from-nearest-specified-value(). + * Used only in the cases where the property * assigned to is identical to the NCName argument, and this is a * shorthand. - *

- * Further, the function call must be the only component of the expression + *

Further, the function call must be the only component of the expression * in which it occurs. (See Rec. Section 5.10.4 Property Value Functions.) * In these circumstances, the function call resolves to a * from-nearest-specified-value() function call on each of the properties to * which the shorthand resolves. - *

- * The use of the pseudo-type should ensure that the function call is not + *

The use of the pseudo-type should ensure that the function call is not * involved in any arithmetic components of a more complex expression. I.e, * the function evaluator in the parser must check to see whether the * property for which the from-nearest-specified-value() function is being @@ -39,22 +34,23 @@ import org.apache.fop.fo.Properties; * be later resolved before the property value can be utilised in the fo * node, but, in the meantime, any attempt to involve the function call in * any more complex expression will throw an exception. - *

- * This mechanism ensures, without greatly complicating the parser, + *

This mechanism ensures, without greatly complicating the parser, * that the constraint on the from-nearest-specified-value() function, with * respect to shorthands, is met. - *

- * This pseudo-datatype is also used as the first stage of shorthand + *

This pseudo-datatype is also used as the first stage of shorthand * expansion. After a shorthand's expression is parsed, the next stage of * resolution will generate a FromNearestSpecified object for each property * in the expansion of the shorthand. + *

Once created, this class acts as an IndirectValue in the + * event that it cannot immediately be resolved. This association exists + * simply to save creating another object. * * @see FromParent * @author Peter B. West * @version $Revision$ $Name$ */ -public class FromNearestSpecified extends AbstractPropertyValue { +public class FromNearestSpecified extends IndirectValue { private static final String tag = "$Name$"; private static final String revision = "$Revision$"; diff --git a/src/org/apache/fop/datatypes/FromParent.java b/src/org/apache/fop/datatypes/FromParent.java index 9497a9554..b416d915d 100644 --- a/src/org/apache/fop/datatypes/FromParent.java +++ b/src/org/apache/fop/datatypes/FromParent.java @@ -1,32 +1,26 @@ package org.apache.fop.datatypes; -import org.apache.fop.fo.expr.AbstractPropertyValue; +import org.apache.fop.datatypes.IndirectValue; import org.apache.fop.fo.expr.PropertyValue; import org.apache.fop.fo.expr.PropertyException; import org.apache.fop.fo.Properties; /* - * FromParent.java - *
* $Id$ - *
* Copyright (C) 2001 The Apache Software Foundation. All rights reserved. * For details on use and redistribution please refer to the * LICENSE file included with these sources. */ /** - *

- * A pseudo-class to represent a call to the core property value function - * from-parent(), only in the cases where the property assigned to + * A pseudo-class to represent a call to the core function from-parent(). + * Used only in the cases where the property assigned to * is identical to the NCName argument, and this is a shorthand. - *

- * Further, the function call must be the only component of the expression + *

Further, the function call must be the only component of the expression * in which it occurs. (See Rec. Section 5.10.4 Property Value Functions.) * In these circumstances, the function call resolves to a * from-parent() function call on each of the properties to * which the shorthand resolves. - *

- * The use of the pseudo-type should ensure that the function call is not + *

The use of the pseudo-type should ensure that the function call is not * involved in any arithmetic components of a more complex expression. I.e, * the function evaluator in the parser must check to see whether the * property for which the from-parent() function is being @@ -38,22 +32,23 @@ import org.apache.fop.fo.Properties; * be later resolved before the property value can be utilised in the fo * node, but, in the meantime, any attempt to involve the function call in * any more complex expression will throw an exception. - *

- * This mechanism ensures, without greatly complicating the parser, + *

This mechanism ensures, without greatly complicating the parser, * that the constraint on the from-parent() function, with * respect to shorthands, is met. - *

- * This pseudo-datatype is also used as the first stage of shorthand + *

This pseudo-datatype is also used as the first stage of shorthand * expansion. After a shorthand's expression is parsed, the next stage of * resolution will generate a FromParent object for each property * in the expansion of the shorthand. + *

Once created, this class acts as an IndirectValue in the + * event that it cannot immediately be resolved. This association exists + * simply to save creating another object. * * @see FromNearestSpecified * @author Peter B. West * @version $Revision$ $Name$ */ -public class FromParent extends AbstractPropertyValue { +public class FromParent extends IndirectValue { private static final String tag = "$Name$"; private static final String revision = "$Revision$"; -- 2.39.5