You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-dev@xmlgraphics.apache.org by Glen Mazza <gr...@yahoo.com> on 2004/11/21 23:49:58 UTC

Do we need an "inherit" enumeration constant?

This is possibly a question for Finn, but if anyone knows:  In our Constants.java [1], we don't have an property enumeration constant for "inherit".  (Go here [2], and search on "inherit", you will see it listed in the Value: section for multiple properties.)  Is there any reason why we don't need it, or did we just forget to add it to our Constants.java?

Thanks,
Glen

[1] http://cvs.apache.org/viewcvs.cgi/xml-fop/src/java/org/apache/fop/fo/Constants.java?annotate=1.18, line 390->
[2] http://www.w3.org/TR/2001/REC-xsl-20011015/slice7.html

Re: Do we need an "inherit" enumeration constant?

Posted by Glen Mazza <gr...@yahoo.com>.
OK, I see, thanks.

Glen

----- Original Message ----- 
From: "Finn Bock" <bc...@worldonline.dk>
To: <fo...@xml.apache.org>
Sent: Monday, November 22, 2004 2:22 AM
Subject: Re: Do we need an "inherit" enumeration constant?


> [Glen]
>
> > This is possibly a question for Finn, but if anyone knows:  In our
> > Constants.java [1], we don't have an property enumeration constant for
> > "inherit".  (Go here [2], and search on "inherit", you will see it
> > listed in the Value: section for multiple properties.)  Is there any
> > reason why we don't need it, or did we just forget to add it to our
> > Constants.java?
>
> It isn't needed as an enum value because the 'inherit' keyword takes
> precedence over the other enumeration values. See 5.9.11:
>
> "The Keyword values take precedence over EnumerationToken."
>
> where Keyword is 'inherit'. The code to handle 'inherit' is at line 397
>
>
http://cvs.apache.org/viewcvs.cgi/xml-fop/src/java/org/apache/fop/fo/properties/PropertyMaker.java?annotate=1.11
>
>
> OTOH the code to deal with 'inherit' and the other enum values needs
> some changes to deal with optional white-space, so perhaps the parsing
> of enums should be passed to the PropertyParser and the 'inherit' test
> should be placed after the call to PropertyParser.parse(). In that case
> a INHERIT constant would be needed.
>
> regards,
> finn


Re: Do we need an "inherit" enumeration constant?

Posted by Finn Bock <bc...@worldonline.dk>.
[Glen]

> This is possibly a question for Finn, but if anyone knows:  In our 
> Constants.java [1], we don't have an property enumeration constant for 
> "inherit".  (Go here [2], and search on "inherit", you will see it 
> listed in the Value: section for multiple properties.)  Is there any 
> reason why we don't need it, or did we just forget to add it to our 
> Constants.java?

It isn't needed as an enum value because the 'inherit' keyword takes 
precedence over the other enumeration values. See 5.9.11:

"The Keyword values take precedence over EnumerationToken."

where Keyword is 'inherit'. The code to handle 'inherit' is at line 397

http://cvs.apache.org/viewcvs.cgi/xml-fop/src/java/org/apache/fop/fo/properties/PropertyMaker.java?annotate=1.11


OTOH the code to deal with 'inherit' and the other enum values needs 
some changes to deal with optional white-space, so perhaps the parsing 
of enums should be passed to the PropertyParser and the 'inherit' test 
should be placed after the call to PropertyParser.parse(). In that case 
a INHERIT constant would be needed.

regards,
finn