<string>

The editors,

I am puzzled by aspects of the datatype <string>.

Section "5.9 Expressions" has

"All property value specifications in attributes within an XSL 
stylesheet can be expressions."

This persuades me that I should be able to pass every raw value from an 
attribute on an FO element to the expression parser.

Section "5.9.8 Strings" has

"Strings are represented either as literals or as an enumeration token. 
All properties contexts allow conversion from enumeration tokens to 
strings."

(On the other hand, the discussion of <string> in 5.11 Property 
Datatypes has only "<string>  A sequence of characters," which caused me 
a great deal of distress.)

5.9.11 Lexical Structure
  Expression Lexical Structure
has
[26]   EnumerationToken   ::=   NCName

So, if I understand this correctly, a <string> is either an NCName or a 
literal.

There are two properties on which <string> is defined, which I cannot 
reconcile with this understanding.


7.8.2 font-family, has

'<family-name>
     The name of a font-family of choice. In the previous example [in 
the CSS2 Recommendation], "Baskerville", "Heisi Mincho W3", and "Symbol" 
are font families. Font family names containing whitespace should be 
quoted. If quoting is omitted, any whitespace characters before and 
after the font name are ignored and any sequence of whitespace 
characters inside the font name is converted to a single space.'

'<generic-family>
     The following generic families are defined: "serif", "sans-serif", 
"cursive", "fantasy", and "monospace". Please see the section on generic 
font families for descriptions of these families. Generic font family 
names are keywords, and therefore must not be quoted.'

...

'XSL modifications to the CSS definition:

'<string>
     The names are syntactically expressed as strings.'

I am assuming that the "names" referred to in the comment on <string> 
are both <family-name>s and <generic-family>s.  <generic-family> values 
look more like enumeration tokens than keywords, and Expression Lexical 
Structure in 5.9.11 Lexical Structure, has

[24]   Keyword   ::=   'inherit'

as the only instance of a keyword.

However, <family-name> does not fit into an NCName/literal definition 
because the font family names may be unquoted and yet contain whitespace 
characters, and be enclosed in whitespace.


7.28.1 content-type
'<string>

     'A specification of the content-type in terms of either a mime-type 
or a namespace.

     'A mime-type specification has the form "content-type:" followed by 
a mime content-type, e.g., content-type="content-type:xml/svg".

     'A namespace specification has the form "namespace-prefix:" 
followed by a declared namespace prefix, e.g., 
content-type="namespace-prefix:svg". If the namespace prefix is null, 
the content-type refers to the default namespace.'

The examples given are unquoted and yet are not NCNames.


Your clarifications on these matters will be most welcome.

Peter West
-- 
Peter B. West  pbwest@powerup.com.au  http://powerup.com.au/~pbwest
"Lord, to whom shall we go?"

Received on Wednesday, 28 November 2001 20:16:23 UTC