OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help



   Re: Mixed content

[ Lists Home | Date Index | Thread Index ]
  • From: Peter Murray-Rust <peter@ursus.demon.co.uk>
  • To: xml-dev@ic.ac.uk
  • 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
>of times
>    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
>above desired
>    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
>answers. =)

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:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To (un)subscribe, mailto:majordomo@ic.ac.uk the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)

  • References:
    • Mixed content
      • From: Leif Jonsson <Leif.Jonsson@era-t.ericsson.se>


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS