[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]
RE: [xml-dev] DTD vs XSD: No Duplicate Types in (Mixed) Content Models
- From: "David Lee" <dlee@calldei.com>
- To: "=?UTF-8?Q?'Maik_St=C3=BChrenberg'?=" <maik.stuehrenberg@uni-bielefeld.de>, "'David Carlisle'" <davidc@nag.co.uk>
- Date: Mon, 31 Jan 2011 10:55:29 -0500
I wasn’t there (for either SGML or XSD's creation) but I can see some rationale behind this behaviour.
Imagine a data binding use case (say a SOAP message).
If you want to bind sequential elements you'd typically put them in a class/struct say
class message {
b b1,b2,b3,b4,b5;
};
But if you see a min/max occurs then this may imply an array instead
class message {
b[maxOccurs] bs;
};
In the first case if the parse sees b,b,b,b
Which member should it populate for the 4th b ?
So I can see why if XSD is used in a data binding use case these rules are very useful.
----------------------------------------
David A. Lee
dlee@calldei.com
http://www.xmlsh.org
-----Original Message-----
From: Maik Stührenberg [mailto:maik.stuehrenberg@uni-bielefeld.de]
Sent: Monday, January 31, 2011 10:33 AM
To: David Carlisle
Cc: G. Ken Holman; xml-dev@lists.xml.org; xmlschema-dev-request@w3.org
Subject: Re: [xml-dev] DTD vs XSD: No Duplicate Types in (Mixed) Content Models
Hello David,
thanks for your comments. I've already realized the operator and
occurrency indicator mistake in the mixed content example (thanks to
Ghislain).
Yes, I'm aware of that the non-deterministic content model is an
anachronism from the SGML days. Do you know if there are any validating
parsers that allow non-deterministic content models (apart from RNG
parsers)?
Regarding the discussion about XML 2.0 and/or microXML that went on the
list some weeks ago, it would be interesting to see if anyone would be
interested to postpone this non fatal error requirement? Of course this
would only be possible for XML 2.0 (not for microXML as far as I
understood the recent discussion)...
Kind regards,
Maik
Am 31.01.11 15:32, schrieb David Carlisle:
> On 31/01/2011 14:22, Maik Stührenberg wrote:
>
>> But when in mixed content models duplicate types are not allowed -- why
>> are they allowed in element content models? The additional #PCDATA of a
>> mixed content model should have only little effect on the question of
>> determinism, or do I forget anything (maybe the whitespace characters
>> that are allowed...)?
>
>
> If there is a #PCDATA token you can't use , or ? in dtd only
> (#PCDATA|a|b|c)* and the deterministic content model rule explictly only
> applies to element content.
>
> http://www.w3.org/TR/xml/#sec-element-content
>
>
>
>> But your declaration is (of course) accepted by the parser because it is
>> non-ambiguous. However, the question remains: why is the original
>
> the requirement to check that teh content model is deterministic os
> marked as "an error"
> http://www.w3.org/TR/xml/#dt-compat
> for compatibility (with SGML)
>
> "an error" is not "fatal error" and so formally it means that the dtd is
> in error but a system isn't obliged to report that. It may make it an
> error, or may just give a warning, or may just work.
>
> David
>
> ________________________________________________________________________
> The Numerical Algorithms Group Ltd is a company registered in England
> and Wales with company number 1249803. The registered office is:
> Wilkinson House, Jordan Hill Road, Oxford OX2 8DR, United Kingdom.
>
> This e-mail has been scanned for all viruses by Star. The service is
> powered by MessageLabs.
> ________________________________________________________________________
>
--
Maik Stührenberg, M.A.
Universität Bielefeld
Fakultät für Linguistik und Literaturwissenschaft
Universitätsstraße 25
33615 Bielefeld
Telefon: +49 (0)521/106-2534
E-Mail: maik.stuehrenberg@uni-bielefeld.de
http://www.maik-stuehrenberg.de
http://www.xstandoff.net
_______________________________________________________________________
XML-DEV is a publicly archived, unmoderated list hosted by OASIS
to support XML implementation and development. To minimize
spam in the archives, you must subscribe before posting.
[Un]Subscribe/change address: http://www.oasis-open.org/mlmanage/
Or unsubscribe: xml-dev-unsubscribe@lists.xml.org
subscribe: xml-dev-subscribe@lists.xml.org
List archive: http://lists.xml.org/archives/xml-dev/
List Guidelines: http://www.oasis-open.org/maillists/guidelines.php
[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]