Re: Whitespace around enumerated attribute values

David Carlisle wrote:
> Now CSS can't do the element content lookup at all, so you don't see
> the problem in that case in CSS based systems. The mathML profile for
> CSS already drops this operator dictionary lookup in favour of using
> explict attruibutes, and that may be a more reasonable place to tighten
> the grammar for enumerated attribute values, disallowing white space.

Would be nice, but assuming we already reduced processing down to XML level, in the sense that in CSS profile MathML processor does not do any preprocessing or normalization at all, spaces still are something that can be stripped by XML processor following XML attribute value normalization rules.

Henri Sivonen wrote:
> If a feature has never been implemented, it should be removed from the
> spec between CR and REC at the latest.

Actually it is implemented, example below works in Mozilla, Opera and Prince (did not try other UAs)

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE math [<!ATTLIST mtext mathvariant (bold) #IMPLIED>]>
<math xmlns="http://www.w3.org/1998/Math/MathML">
<mtext mathvariant=" bold	">This text should be bold</mtext>
</math>

What is root of the problem is usage of extrenal DTDs, as those are either not processed or substituted with imcomplete local copy, as a result parser lacks information about attribute types. This example fails in Mozilla, Opera and Prince:

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE math PUBLIC "-//W3C//DTD MathML 2.0//EN" "http://www.w3.org/Math/DTD/mathml2/mathml2.dtd">
<math xmlns="http://www.w3.org/1998/Math/MathML">
<mtext mathvariant=" bold	">This text should be bold</mtext>
</math>


> The XML layer gives  
> attribute values as strings to a higher processing layer without  
> knowing what the higher layer wants to do with them. The spec for  
> MathML needs to define what a MathML renderer reading the DOM is to do  
> with an attribute value like "    false    ".

Ok. Taking into account David's comment I suppose in CSS profile we can clarify that MathML processor 
does not strip spaces and just ignores invalid attribute values like:

<?xml version="1.0" encoding="utf-8"?>
<math xmlns="http://www.w3.org/1998/Math/MathML" version="to be specified">
<mtext mathvariant=" bold	">This text should not be bold</mtext>
</math>

That will deal with MathML part of the story. The same problem will still remain on XML level however as illustrated in earlier examples, we can not solve that one as it is outside our scope, but we can add informative comments in document conformance part suggesting not to rely on attribute value normalization. Will that address your concern?

-- 
_______________________________________________
Surf the Web in a faster, safer and easier way:
Download Opera 9 at http://www.opera.com

Powered by Outblaze

Received on Tuesday, 8 January 2008 16:03:58 UTC