W3C home > Mailing lists > Public > xmlschema-dev@w3.org > January 2006

RE: xs:choice and xs:sequence question

From: Tolkin, Steve <Steve.Tolkin@FMR.COM>
Date: Thu, 12 Jan 2006 17:51:04 -0500
Message-ID: <493A37523A8D17448240DA1DDDE924B40686CDF1@MSGBOSCLD2WIN.DMN1.FMR.COM>
To: <xmlschema-dev@w3.org>

I think it is very useful to have a simple explanation, e.g. "the
content model is ambiguous, ...".  

I also think it is useful to include the URI.  Even if the text pointed
to by the URI is hard to understand it serves as a useful identifier.
It will typically be shorter.  It can be included in a bug report.  It
can be used to different tools (provided they emit it).  It is language
independent.  (Of course different implementations might report
different reasons for the same erroneous xml.)

So if not too burdensome I suggest providing both error "messages",
perhaps with an option to control whether one or both is produced.

Hopefully helpfully yours,
Steven Tolkin 
There is nothing so practical as a good theory.  Comments are by me, not
Fidelity Investments, its subsidiaries or affiliates.

-----Original Message-----
From: Michael Kay [mailto:mike@saxonica.com] 
Sent: Thursday, January 12, 2006 12:05 PM
To: 'George Cristian Bina'; d_a_carver@yahoo.com
Cc: xmlschema-dev@w3.org
Subject: RE: xs:choice and xs:sequence question

> oXygen reports the error with a link to the specification 
> related with that:
> http://www.w3.org/TR/xmlschema-1/#cos-nonambig

A tangential remark: I wonder how useful this is? I know Appendix C says
that validity errors "should" be reported citing the chapter and verse
the spec, but is there really any serious prospect that the average
author will get any value from this? Your link points to the sentence:

"A content model must be formed such that during .validation. of an
information item sequence, the particle component contained directly,
indirectly or .implicitly. therein with which to attempt to .validate.
item in the sequence in turn can be uniquely determined without
the content or attributes of that item, and without any information
the items in the remainder of the sequence."

I suspect most users can't even parse the syntax of this sentence, let
understand what it means.

I decided in Saxon that there wasn't any point in referring people to
spec, and instead try to explain what's wrong in my own words. In this
you will get a message to the effect: "the content model is ambiguous,
<elementname> appears in more than one place".

Any views on this from users?

Michael Kay
Received on Thursday, 12 January 2006 22:51:16 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:15:32 UTC