Tony Graham wrote:
> [EMAIL PROTECTED] wrote at 27 Sep 2002 16:44:32 -0300:
> > Out of the XML recomendation,section 2.2:
> >
> > A character is an atomic unit of text as specified by ISO/IEC
> > 10646 [ISO10646]. Legal characters are tab,
> > carriage return, line feed, and the legal graphic characters of Unicode
> > and ISO/IEC 10646.
>
> XML 1.0 Second Edition removed "graphic" (which I always found
> confusing but which is good ISO-speak).
>
> > or, more clearly:
> >
> > Char ::= #x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] |
> > [#x10000-#x10FFFF]
> > /* any Unicode character, excluding the surrogate blocks, FFFE,
> > and FFFF. */
> >
> >
> > That means "-", "#12235" , etc are characters, while "'1'" is not.
>
> ⿋ is a character reference. '#12235' is how you talk about a
> character's code point, although the hexadecimal representation is
> usually preferable.
>
> In XSL terms, "'1'" is a one-character string literal, but while you
> could claim that it is one character, there's no XSL conversion from a
> string to a character, so <fo:character character="'1'"/> should fail.
Tony,
I don't think this gets us out of difficulty. A casual inspection
reveals no conversion, either, from an NCName to a character. So an
attribute value assignment of
"a"
will, I think, parse (in the parser implied by the grammar of XSL
expressions) as an NCName (whereas
"-"
will parse as an unadorned MINUS sign.) So how do I represent a character?
Furthermore, Section 5.11 has
<q>
<character>
A single Unicode character.
<string>
A sequence of characters.
</q>
If an attribute value assignment of
"'a sequence of characters'"
assigns a sequence of characters, then
"'a'"
must assign a sequence of one character.
What's the difference between "a single Unicode character" and "a
sequence of one character"? Well, one is a sequence, and therefore a
string, and there's no XSL conversion, etc.
So how do I represent a character?
To me, the cleanest, least ambiguous way is to represent a <character>
attribute assignment value with "'<character>'" - a string literal of
length 1.
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]