Lists Home |
Date Index |
- From: Peter Murray-Rust <firstname.lastname@example.org>
- To: email@example.com
- Date: Fri, 17 Apr 1998 12:38:23
At 11:15 07/04/98 +0200, Leif Jonsson wrote:
Hello Leif - great to hear from you.
>My name is Leif Jonsson and I am a computer scientist student from
>I have two basic questions, and I apologize if they are very obvious,
They are not 'obvious' - they get asked frequently and answered frequently :-)
>but I haven't
>found a clear answer to it in any FAQ so I ask in this forum.
Since no-one else has answered, I'll try (I've been away for a few days ...)
>1. Why are the restrictions in MIXED CONTENT as they are, that is, no
> between the elements are allowed and you can not specify the number
> they are to appear?
This is a deliberate decision of the XML-WG - in their balance between
simplicity and power. SGML allows much more varied and powerful content models
but they are harder to use. One particular combination of mixed content is
called 'pernicious mixed content' and bites almost all newcomers to SGML.
The designers took care that pernicious mixed content couldn't occur in
XML, and that would prevent millions of new, excited, XML users getting
switched off in the first few days.
Other decisions were that simple-minded hackers (like me) cannot write
validating parsers for some of the really complex content models (that is
why the & connector is disallowed - (A & B) means exactly one A and exactly
one B, but the order doesn't matter).
>2. With the question above in mind, I assume there are some theoretical
> to these restrictions, but how are you then supposed to achieve the
> effects without adding "wrapper elements"? Is there a restructuring
>you can do or?
This is part of the trade-off. The only mixed content construct with
This means that if you want to restrict the order or the cardinality you
either have to create new elements (wrappers) or require the validation be
outside the DTD - e.g. in the application. Since some of the validation is
outside the parser anyway (see XLL specification, for example), we think
that we can live with this.
>Again I apologize if these are stupid questions, but at least then they
>should have short
The SGML community welcomes ignorant questions (ignorance is not a crime).
They treated me extremely gently and kindly when I asked these sort of
things 3 years ago.
xml-dev: A list for W3C XML Developers. To post, mailto:firstname.lastname@example.org
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To (un)subscribe, mailto:email@example.com the following message;
To subscribe to the digests, mailto:firstname.lastname@example.org the following message;
List coordinator, Henry Rzepa (mailto:email@example.com)
- Mixed content
- From: Leif Jonsson <Leif.Jonsson@era-t.ericsson.se>