Re: XHTML 1.0 Strict - ELEMENT: head - Confusing sort order definition?

On 2006-10-24 18:26, MichaelB wrote:

> What is the use of this complex construct?:
> 
> <!-- content model is %head.misc; combined with a single
> title and an optional base element in any order -->
> 
> <!ELEMENT head (%head.misc;,
> ((title, %head.misc;, (base, %head.misc;)?) |
> (base, %head.misc;, (title, %head.misc;))))>
> 
> Wouldn't this one be simpler?
> 
> <!ELEMENT head (title|%head-misc;|base?)>

It doesn't mean the same thing. That content mode would mean that "head" 
can contain "title" OR "%head-misc;" (whatever it refers to) OR "base" 
(optional).

XML removed the 'and' connector ("&") that can be used in SGML. You can 
still express everything with the other two connectors ("|" and ","), 
but it will get longer.

-- 
David Håsäther

Received on Monday, 30 October 2006 14:31:44 UTC