Re: [Geopriv] [RAI] [Simple] PLEASE TAKE NOTE: Fwd: [TechnicalErrata Reported] RFC4480 (3121)

From: Pete Cordell ^lt;>
Date: Mon Feb 20 2012 - 05:36:03 EST

Original Message From: "Saúl Ibarra Corretgé"
> On Feb 16, 2012, at 7:26 PM, Hannes Tschofenig wrote:
>> I am curious: Why you do schema validation?
>> When you receive a PIDF document in a SIP message then you will have to
>> parse it. Since we put any namespace="##other" statements in nearly all
>> our schema files I am curious what you actually going to learn from the
>> validation since almost everything validates without error.

> Well, I like to do schema validation to al least know that the document
> doesn't violate the specified structure. Yes, you may put whatever you
> want
> in ##other, but PIDF does define certain elements, and those will not fall
> in the ##other bucket, so those should be validated.

I don't know anything about PIDF, but I know a bit about XML Schema and I
think there might be some mis-understanding of what <xs:any
namespace="##other"> does.

If you have a schema fragment like:

     <xs:element name="activities">
                 <xs:element name="breakfast"
                   type="empty" />
                 <xs:element name="dinner"
                   type="empty" />
                 <xs:element name="meal"
                   type="empty" />
                 <xs:any namespace="##other"
                   maxOccurs="unbounded" processContents="lax"/>

Then the following would _violate_ the schema:


The reason is that the <xs:any> element is specifying that the extension
must be in an-other namespace, not the namespace specified by the schema.

Something like the following would be OK:

    <xmlns:v2="urn:ietf:params:xml:ns:pidf:rpid:v2" v2:lunch/>

So as I understand it, I believe this change could
break existing implementations that choose to use schema
validation. Whether, given the state of current implementation, that is a
issue in practice is a matter for the group.


Pete Cordell
Codalogic Ltd
Interface XML to C++ the easy way using C++ XML
data binding to convert XSD schemas to C++ classes.
Visit or
for more info

Geopriv mailing list
Received on Mon, 20 Feb 2012 10:36:03 -0000

This archive was generated by hypermail 2.1.8 : Mon Feb 20 2012 - 09:41:45 EST