Joerg,

Aside from the ambiguity Arved has highlighted concerning the use of the 
term "code point", I was thinking about the recent decision to hack the 
spec so that 'format="1."' becomes acceptable.  I already find the 
automatic conversion of NCNames to strings distasteful enough.  Users 
develop bad habits from that sort of under-the-hood convenience, and 
that leads to loud complaints about all those fussy quotes when they 
become essential.

If I take <character> to be a string literal of length 1, the automatic 
conversion of NCNames of length 1 would allow, say,

<fo:character character="A"/>

So when users try

<fo:character hyphenation-character="-"/>

they are understandably upset when the parser barfs.

My inclination is to do away with the automatic conversion and 
specifically allow an NCName (with explicit conversion) alongside a 
literal when it is considered safe, as it is not in the case of 
<character> or format.  After all, <string> and <character> don't occur 
all that frequently.

See below.

J.Pietschmann wrote:
> 
> According to 5.11 "Property Datatypes", the value is a single
> unicode character. I believe the representation is a
> unceremonial single unicode character, or an NCName whose
> string representation has the length 1. I'd parse such
> attributes as an expression resulting in a string, and
> bomb if the string is longer than 1.
> This would accept
>  character="'a'"
>  character="1 + 1"
>  character="from-parent('font-size') - 12"
> which may upset purist, or not.
> An alternative would be to use a custom parser, which accepts
> either a single character (NCName of length 1) or any of the
> functions inherited-property-value(NCName),
> from-parent( NCName), from-nearest-specified-value( NCName)
> and from-table-column( NCName)
> (might even make a bit of sense for hyphenation-char and
> for fo:character's character in very, very strange cases)

A custom parser should not be necessary.  The <character> restriction 
could be expressed as a constraint on the <string> result, checked at 
the property level.

> Just for curiosity: what should happen if the following snippet
> is used:
>  <fo:page-sequence master-reference="font-size" font-size="20pt">
>    <fo:flow font-size="from-parent(from-parent('master-reference'))"/>

This looks OK.

Peter
-- 
Peter B. West  [EMAIL PROTECTED]  http://www.powerup.com.au/~pbwest/
"Lord, to whom shall we go?"


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

Reply via email to