I think someone mentioned earlier in this thread that there were UPA
(Unique Particle Attribution) problems with the schema.  Some people
dislike the UPA rules and ignore them (as discussed in
http://www.w3.org/2005/05/25-schema/microsoft.html); Xerces enforces
them.

-----Original Message-----
From: Minh Thang Dang [mailto:[EMAIL PROTECTED] 
Sent: Friday, December 14, 2007 3:08 PM
To: [email protected]
Subject: RE: Problem when parsing MPEG-7 metadata with schemas




> Subject: RE: Problem when parsing MPEG-7 metadata with schemas
> Date: Thu, 13 Dec 2007 11:14:39 -0500
> From: [EMAIL PROTECTED]
> To: [email protected]
> 
> I'm with Dave: your best bet is to run under a debugger and look at
> where it crashes.
> 
> Failing that, you might want to take a look at the DOMPrint sample.
On
> my machine, it parses and prints your sample document just fine (with
-n
> -s -f -v=always) if all the relevant schema docs are in the same
> directory.  This would seem to indicate some problem in your code.
It's
> not a perfect match, since DOMPrint operates on a file input source
> rather than a MemBufInputSource.  (Are you absolutely certain that
> strlen(pXMLString) is the actual size of your buffer?)
> 

I tried out the MemParse sample provided in the Xerces C package.
I replaced the XML string in the MemParse sample by my XML string. After
recompiled it, I run:
MemParse.exe -v=always -n -s -f

And got the following error:

Error at (file prodInfo, line 4, char 71): Complex type
'ShotEditingTemporalDeco
mpositionType' violates the Unique Particle Attribution rule in its
components '
CompositionTransition' and 'CompositionTransition'

Error at (file prodInfo, line 4, char 71): Complex type
'ShotEditingTemporalDeco
mpositionType' violates the Unique Particle Attribution rule in its
components '
CompositionTransitionRef' and 'CompositionTransitionRef'

Error at (file prodInfo, line 4, char 71): Complex type
'ShotEditingTemporalDeco
mpositionType' violates the Unique Particle Attribution rule in its
components '
CompositionShot' and 'CompositionShot'

Error at (file prodInfo, line 4, char 71): Complex type
'ShotEditingTemporalDeco
mpositionType' violates the Unique Particle Attribution rule in its
components '
CompositionShotRef' and 'CompositionShotRef'

Anyone got any clue for these errors?

Again, here is my XML string:

<Mpeg7 xmlns="urn:mpeg:mpeg7:schema:2001" 
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
       xmlns:mpeg7="urn:mpeg:mpeg7:schema:2001" 
       xsi:schemaLocation="urn:mpeg:mpeg7:schema:2001 Mpeg7-2001.xsd">
     <DescriptionMetadata>
        <Version>1.0</Version>
        <PrivateIdentifier>descriptionUnitExample</PrivateIdentifier>
    </DescriptionMetadata>
    <DescriptionUnit xsi:type="ScalableColorType" numOfCoeff="16"
numOfBitplanesDiscarded="0">
        <Coeff> 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 </Coeff>
    </DescriptionUnit>
</Mpeg7>

The MPEG-7 XML Schema can be downloaded at:
http://m7itb.nist.gov/Mpeg7-2001.xsd

The MemParse sample is located at \xerces-c-src_2_8_0\samples\MemParse

Thank you very much. Best regards.

Minh Thang Dang



_________________________________________________________________
Fancy some celeb spotting? 
https://www.celebmashup.com

Reply via email to