[xsd-users] Mpeg-7 schema support? Problem:

Boris Kolpackov boris at codesynthesis.com
Mon Feb 5 02:15:31 EST 2007


Hi Felix,

Felix Zielke <felix.zielke at iais.fraunhofer.de> writes:

> I have the same problem with the mpeg-7 schema. It is astonishing that
> there are very few google hits on that issue. Stylus XML Studio detects
> that UPA rule violation. I would very much like to know what the mpeg-7
> guys say to that. Did you contact anyone? If you will, please let me
> know.

Here is the information Mattis sent me privately. He apparently
contacted mpeg7 working group and they seem to agree they've got
a bug.


hth,
-boris


----- Forwarded message from Mattis Fjallstrom <mattis at sonic.net> -----

Hi Boris,

Just to let you know, you were right. :-) I got some more information on
the mpeg-7 schema problem.

Cheers,

Mattis

---------------------------- Original Message ----------------------------
Subject: Re: FW: Mpeg7 schema, potential bug
From:    "Gerrard Drury" <gerrard at enikos.com>
Date:    Wed, November 15, 2006 12:02 am
To:      "Mattis Fjallstrom" <mattis at acm.org>
Cc:      i.burnett at elec.uow.edu.au
--------------------------------------------------------------------------

Hello Mattis,

My name is Gerrard Drury and I work with Associate Professor Ian S
Burnett at the University of Wollongong. Ian is the current chair of the
MDS subgroup of MPEG.

I was not actually involved in the development of MPEG-7 MDS (my
involvement with MPEG is in the area of MPEG-21), however I have had a
look at the schema errors you have identified.

Indeed the errors identified by Boris are a problem with the
mds-2001.xsd schema.

Note that I am using Oxygen XML 7.2 and this picked up the errors ok.
(It  picked up a similar error in a few other places also.)

I suspect that back when MPEG-7 was being finalised, in about 2001, the
tools used to validate the schema did not pick up the problems.

The semantics for ShotEditingTemporalDecompositionType as stated in
ISO/IEC 15938-5 (subclause 11.9.8) state:

 > In an ShotEditingTemporalDecomposition DS
 > description, the CompositionShot DS and
 > CompositionTransition DS descriptions shall be
 > ordered in time. Furthermore, a CompositionShot DS
 > description can be preceded and followed by a
 > CompositionTransition DS description, but not by
 > another CompositionShot DS description

Hence I think that the schema is intended to express this, but
unfortunately as currently expressed it does violate the UPA rule.

The consequence for the MPEG-7 MDS schema is that we would require
issuing a corrigendum to correct the schema such that it is valid as per
W3C XML Schema.

However to do this we would also need to somehow come up with
alternative XML Schema definitions that express the intended XML syntax
and is also valid W3C XML Schema.

To initiate action for a corrigenda to be undertaken would require
submitting a Defect Report for ISO/IEC 15938-5.

Such a Defect Report would contain information such as
- references to locations in the document(s) where the defect occurs,
- nature of the defect (in this case an "error"),
- explanation of the problem, and
- optionally, a proposal to correct the problem

Ian might correct me on the procedure, but I think that normally such a
Defect Report would be a SC 29/WG 11 document output from an MPEG meeting.

In this case it would probably be prompted by an input contribution to
an MPEG meeting that basically provided all the required information
that would go in to the official Defect Report.

In regards to a possible solution, if you want to widen the discussion
you could possibly try posting to the following list:

http://lists.mpegif.org/mailman/listinfo/mp7-tech

However note that there has been no activity on this list for over a year.

Alternatively, as this is also a more general question of how to express
a desired XML syntax in W3C XML Schema, another option might be to
searching/posting to the XML schema list.

http://lists.w3.org/Archives/Public/xmlschema-dev/

One thread I saw recently that might be helpful, though they are solving
a somewhat different problem:

http://lists.w3.org/Archives/Public/xmlschema-dev/2006Oct/0013.html

To simplify the discussion a bit, maybe if we define

S = choice of CompositionShot or CompositionShotRef
T = choice of CompositionTransition or CompositionTransitionRef

I think that, in my interpretation of the text and the schema as it
currently is, what is basically desired is that the syntax allows for
alternating S and T elements with possibly only one of either S or T.
i.e. element sequences like

S
ST
STS
STST
STSTS
STSTST
...
T
TS
TST
TSTS
TSTST
TSTSTS
...

(It would actually be good to clarify this with some of the original
people that worked on this technology. I will try to follow this up with
some contacts we have.)

I would have to give it some more thought as to how this might be able
to be expressed n W3C XML Schema, however it might be that it cannot be
done.

Hope that some of this information has been of help.

Kind Regards,
Gerrard

Ian Burnett wrote:
>  Gerrard,
>
> Any comments?
>
> Ian
>
> -----Original Message-----
> From: Leonardo Chiariglione [mailto:leonardo at chiariglione.org]
> Sent: Tuesday, November 14, 2006 7:27 PM
> To: Ian S Burnett
> Cc: mattis at acm.org
> Subject: RE: Mpeg7 schema, potential bug
>
> Ian,
> Can you help Mattis?
> Leonardo
>
> Leonardo Chiariglione, Ph. D.
> Digital Media Strategist
> http://www.cedeo.net/
>
>
>
> -----Original Message-----
> From: Mattis Fjallstrom [mailto:mattis at sonic.net]
> Sent: Tuesday, 14 November, 2006 03:31
> To: leonardo at chiariglione.org
> Subject: Mpeg7 schema, potential bug
>
> Dear Professor Chiariglione,
>
> I hope this in not an inappropriate address to use. I found your name and
> address on the Mpeg7 home pages, and I believe I have stumbled on a problem
> (potential bug) in the Mpeg7 schema. I'm not sure who to direct my question
> to - I tried one of the names on the FAQ, but the FAQ was written in 2000
> and the address on longer valid. If you are not the right person, maybe you
> can point me in the right direction?
>
> My name is Mattis Fjallstrom, I'm currently doing video processing research
> at KDDI in Japan. I'm trying to parse a set of Mpeg7 files that holds
> information about our video clips. Previously, I used the Xerces parser
as a
> SAX parser and that works, but SAX is really an inappropriate choice for
our
> application. I found a data binding parser instead, but it won't accept the
> Mpeg7 schema. Further analysis showed that this parser might be right.
>
> There is a part in the mds-2001.xsd document that seems like it would
> violate the Unique Particle Attribution rule. Several of the popular
parsers
> doesn't realize this - but it means that an Mpeg7 document that conforms to
> the schema may be unparseable.
>
> The information below comes from Boris Kolpackov (boris at codesynthesis.com)
> who did most of the research on this one (seeing how I'm pretty new to
> Mpeg7).
>
> Was this a known problem? Is there a way to fix it?
>
> Thank you and again, apologies if this got to the wrong person.
>
> Cheers,
>
> Mattis
>
> Mattis Fjallstrom
> mattis at acm.org
>
> ---------------------------------------------------------------------
>
>>From Boris Kolpackov:
>
>
> I finally got around to checking the mpeg-7 schemas and it seems they
indeed
> violate the UPA rule. Consider this fragment from mds-2001.xsd, line 3999:
>
> <sequence>
>   <choice>
>     <element name="CompositionShot" type="mpeg7:CompositionShotType"/>
> <element name="CompositionShotRef" type="mpeg7:ReferenceType"/>
>   </choice>
>   <sequence minOccurs="0" maxOccurs="unbounded">
>     <choice>
>       <element name="CompositionTransition"
> type="mpeg7:CompositionTransitionType"/>
>       <element name="CompositionTransitionRef" type="mpeg7:ReferenceType"/>
>     </choice>
>     <choice>
>       <element name="CompositionShot" type="mpeg7:CompositionShotType"/>
> <element name="CompositionShotRef" type="mpeg7:ReferenceType"/>
>     </choice>
>   </sequence>
>   <choice minOccurs="0">
>     <element name="CompositionTransition"
> type="mpeg7:CompositionTransitionType"/>
>     <element name="CompositionTransitionRef" type="mpeg7:ReferenceType"/>
>   </choice>
> </sequence>
>
> In particular the last sequence and choice. When parser sees a
> CompositionTransition element it does not know (without looking ahead)
which
> branch it happens to belong (sequence of choice).
>
> It is interesting to note that quite a few XML Schema processors report
that
> this schema is valid. In particular I tried Xerces-J, Jing, and MSV from
> this service:
>
> http://www.mel.nist.gov/msid/validation/
>
> All three of them reported that the schema is valid. I was wondering how
> they were going to handle an instance for such a schema so I created a
small
> test schema that reproduces the questionable structure found in the
> mpeg-7 schemas:
>
> <?xml version="1.0"?>
> <schema xmlns="http://www.w3.org/2001/XMLSchema"
>         xmlns:t="test"
>         targetNamespace="test">
>
> <complexType name="ShotEditingTemporalDecompositionType">
>   <sequence>
>     <sequence minOccurs="0" maxOccurs="unbounded">
>       <choice>
>         <element name="CompositionTransition" type="string"/>
>         <element name="CompositionTransitionRef" type="string"/>
>       </choice>
>       <choice>
>         <element name="CompositionShot" type="string"/>
>         <element name="CompositionShotRef" type="string"/>
>       </choice>
>     </sequence>
>     <choice minOccurs="0">
>       <element name="CompositionTransition" type="string"/>
>       <element name="CompositionTransitionRef" type="string"/>
>     </choice>
>   </sequence>
> </complexType>
>
> <element name="root" type="t:ShotEditingTemporalDecompositionType"/>
>
> </schema>
>
> And a test XML instance document:
>
> <?xml version="1.0"?>
> <t:root xmlns:t="test"
>         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>         xsi:schemaLocation="test test.xsd">
>
>   <CompositionTransition>a</CompositionTransition>
>
> </t:root>
>
> Again, the above three processors all reported that the schema is valid.
> However, when I tried to validate the instance against the schema all of
> them failed saying that the instance is not valid (all of them assumed the
> first branch and expected to see CompositionShot or CompositionShotRef
> elements). Strangely enough, after reporting that the instance is not
valid,
> Jing also reported that the schema violates the UPA rule:
>
> ~/test.xsd:4:58: error: cos-nonambig: "":CompositionTransition and
> "":CompositionTransition (or elements from their substitution group)
> violate "Unique Particle Attribution".
>
>
> hth,
> -boris


----- End forwarded message -----
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 652 bytes
Desc: Digital signature
Url : http://codesynthesis.com/pipermail/xsd-users/attachments/20070205/c4a11ae7/attachment.pgp


More information about the xsd-users mailing list