Subject: Re: [clue] Question about draft-ietf-clue-data-model-schema-07

From: Roberta Presta <[email-masked]>
Date: Thu, 02 Oct 2014 11:04:23 +0200

Hello Paul,
please see below.

Il 30/09/2014 23:07, Paul Kyzivat ha scritto:
> (I think this is really a basic xml question)
>
> The examples (in sections 23.1, 26, and 27) define media captures as 
> follows:
>
> <mediaCaptures>
>     <mediaCapture xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>     xsi:type="audioCaptureType"
>     captureID="AC0"
>     mediaType="audio">
> ...
>
> I was expecting something like:
>
> <mediaCaptures>
>     <audioCapture captureID="AC0" mediaType="audio">
> ...
>
> Is what is shown necessary because "audioCapture" isn't defined as an 
> element in the schema, though "audioCaptureType" is defined as a type?
>
> If <audioCapture> was defined, would the two forms above be equivalent?
>

[RP]
If you want something like:
<mediaCaptures>
     <audioCapture captureID="AC0" mediaType="audio">
You need to change also the definition of the <mediaCaptures> element, 
besides defining a new element called "audioCapture", otherwise you have 
a validation error.
The new <mediaCaptures> definition should envision a sequence of 
<audioCapture> elements, followed by a sequence of <videoCapture> 
elements, then followed by a sequence of generic media capture elements, 
i.e., you need to specify an order that  the elements of different type 
must respect  when listed in <mediaCaptures>.
Currently, <mediaCaptures> collects captures without a specific order.

Regards,

Roberta

>     Thanks,
>     Paul
>
> _______________________________________________
> clue mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/clue
>

---

From: Paul Kyzivat <[email-masked]>
Date: Thu, 02 Oct 2014 10:16:20 -0400

> Currently, <mediaCaptures> collects captures without a specific order.

As you know, my understanding of xml is limited, so bear with me even if 
I am talking nonsense.

Don't instances of type Y that extends type X qualify as instances of 
type X for purposes of validation? (Basic polymorphism.)

You seem to be saying NO. If not, then what is the point of extension?

And, what does:

   <mediaCapture ... xsi:type="audioCaptureType" ... >

mean? I was guessing that, even though written as <mediaCapture... it is 
really an instance of audioCaptureType.

	Thanks,
	Paul