Re: Question on parsing of "font" property

> So?  What do font names have to do with nmtoken>

Let's take a look here:

declaration
  : property ':' S* expr prio?
  | /* empty */
  ;
expr
  : term [ operator term ]*
  ;
term
  : unary_operator?
    [ NUMBER S* | PERCENTAGE S* | LENGTH S* | EMS S* | EXS S* | ANGLE S* |
      TIME S* | FREQ S* | function ]
  | STRING S* | IDENT S* | URI S* | hexcolor
  ;

operator
  : '/' S* | COMMA S* | /* empty */
  ;

following this we are getting rule for a non quouted font names:

font-name: IDENT S* [, IDENT S* ]* 

where IDENT is 

IDENT {nmstart}{nmchar}*

nmstart		[_a-z]|{nonascii}|{escape}
nmchar		[_a-zA-Z0-9-]|{nonascii}|{escape}

So each component of  non quoted font name MUST be an IDENT
So e.g. font name @batang MUST be escaped

PS: sorry I used 'nmtoken' by mistake.
But in fact IDENT is even more strict.


Andrew Fedoniouk.
http://terrainformatica.com

Received on Wednesday, 19 May 2004 17:54:42 UTC