W3C home > Mailing lists > Public > public-html@w3.org > April 2008

Re: several messages about New Vocabularies in text/html

From: Henri Sivonen <hsivonen@iki.fi>
Date: Wed, 2 Apr 2008 17:21:50 +0300
Cc: Sam Ruby <rubys@us.ibm.com>, Neil Soiffer <Neils@dessci.com>, public-html@w3.org, www-math@w3.org
Message-Id: <DA95B192-200D-442F-AE7F-B032E23AB2FA@iki.fi>
To: Ian Hickson <ian@hixie.ch>

On Apr 2, 2008, at 04:57, Ian Hickson wrote:
> I have been unable to come up with a generic syntax for vocabulary
> extension that looks (even slightly) like XML and that would  
> actually work
> in practice on the Web.

Could you please elaborate why the following won't work? In  
particular, would the following breaks such a large mass of pages as  
to Break The Web? (Especially if the rendering rules for MathML are  
adjusted so that text children of <math> are rendered like text  
children of an HTML <span>.)

The following elements are defined as 'namespace-sensitive':
  <annotation-xml encoding="application/xhtml+xml">
  <annotation-xml encoding="OpenMath">.

Namespace-sensitive elements have two namespace URIs associated with  
them: self and scope.

    self: http://www.w3.org/1999/xhtml
    scope: http://www.w3.org/1999/xhtml
    self: http://www.w3.org/2000/svg
    scope: http://www.w3.org/2000/svg
    self: http://www.w3.org/1998/Math/MathML
    scope: http://www.w3.org/1998/Math/MathML
    self: http://www.w3.org/2000/svg
    scope: http://www.w3.org/1999/xhtml
  <annotation-xml encoding="application/xhtml+xml">
    self: http://www.w3.org/1998/Math/MathML
    scope: http://www.w3.org/1999/xhtml
  <annotation-xml encoding="OpenMath">
    self: http://www.w3.org/1998/Math/MathML
    scope: http://www.openmath.org/OpenMath

The namespace of a element node to be inserted is determined as follows:
  1) If the node to be inserted is an namespace-sensitive element, use  
the value for 'self' in the above list and abort these steps.
  2) Let 'node' be the current node on the stack of open elements.
  3) If 'node' is a namespace-sensitive element, use the value for  
'scope' in the above list and abort these steps.
  4) Let 'node' be the next node on the stack of open elements towards  
the root element.

(Of course, the repeated stack walking should be optimized away.)

The /> empty element syntax should be supported on start tag tokens  
(node popped immediately) whose namespace doesn't resolve to http://www.w3.org/1999/xhtml 
  according to the above rule.

When the stack is pushed/popped, the namespace of the current node  
must be inspected. If it is http://www.w3.org/1999/xhtml, the  
tokenizer must be set not to support CDATA sections. Otherwise, the  
tokenizer must be set to support CDATA sections.

Henri Sivonen
Received on Wednesday, 2 April 2008 14:22:41 UTC

This archive was generated by hypermail 2.4.0 : Saturday, 9 October 2021 18:44:28 UTC