Subject: [Ecrit] Additional Data: XML Schema and Instance Documents

From: Hannes Tschofenig <[email-masked]>
Date: Wed, 01 May 2013 12:19:01 +0300

Hi all,

I went through the document and validated various XML schemas. I also 
added examples.

You can find them here:
https://github.com/hannestschofenig/tschofenig-ids/tree/master/additional-data/xml

One problem I ran into was with regard to the XML-based VCard structure 
(called xCard). RFC 6351, see http://tools.ietf.org/html/rfc6351, 
defines a Relax NG schema rather than an XML schema and I was not able 
to use it directly within the additional data XML schemas.

I don't know whether someone of you had ever tried to mix XML schemas 
and Relax NG schemas but it does not seem to be completely easy.

Help appreciated.

Here is what I did: I excluded the xCard structures from the XML schema 
but due to the extensibility mechanism with the any namespace="##other" 
construct you can add pretty much everything anyway.

Here is an example of the resulting XML schema:
https://github.com/hannestschofenig/tschofenig-ids/blob/master/additional-data/xml/emergencyCall.SubInfo.xsd

Here is an instance document:
https://github.com/hannestschofenig/tschofenig-ids/blob/master/additional-data/xml/emergencyCall.SubInfo-example.xml

If you are not happy with the result there are three other ways to solve 
the problem:

1) Create an XML schema of the XCard structure
2) Remove all XML schemas from the additional data document
3) Find out whether there is a way to import Relax NG schemas into an 
XML schema

Ciao
Hannes

---

From: Brian Rosen <[email-masked]>
Date: Wed, 1 May 2013 10:26:52 -0400

There is a 4) Make Relax NG schemas for additional-data.

But, actually, unless 3) is realistic, I vote for 1).  It's not hard, and NENA would really appreciate a referenceable XML schema for XCard.

Brian

On May 1, 2013, at 5:19 AM, Hannes Tschofenig <[email-masked]> wrote:

> Hi all,
> 
> I went through the document and validated various XML schemas. I also added examples.
> 
> You can find them here:
> One problem I ran into was with regard to the XML-based VCard structure (called xCard). RFC 6351, see http://tools.ietf.org/html/rfc6351, defines a Relax NG schema rather than an XML schema and I was not able to use it directly within the additional data XML schemas.
> 
> I don't know whether someone of you had ever tried to mix XML schemas and Relax NG schemas but it does not seem to be completely easy.
> 
> Help appreciated.
> 
> Here is what I did: I excluded the xCard structures from the XML schema but due to the extensibility mechanism with the any namespace="##other" construct you can add pretty much everything anyway.
> 
> If you are not happy with the result there are three other ways to solve the problem:
> 
> 3) Find out whether there is a way to import Relax NG schemas into an XML schema
> 
> Ciao
> Hannes
> _______________________________________________
> Ecrit mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/ecrit

---

From: Martin Thomson <[email-masked]>
Date: Wed, 1 May 2013 07:49:05 -0700

http://relaxng.org/#conversion

---

From: Hannes Tschofenig <[email-masked]>
Date: Thu, 02 May 2013 00:22:20 +0300

Hi Brian,

I converted the vCard Relax NG schema into an XML schema (using trang 
and changed it slightly) and incorporated it into one of the XML schemas 
from the draft.

Here is the vCard XML schema:
https://github.com/hannestschofenig/tschofenig-ids/blob/master/additional-data/xml/vcard.xsd

Here is the updated subscriber info schema:
https://github.com/hannestschofenig/tschofenig-ids/blob/master/additional-data/xml/emergencyCall.SubInfo.xsd

Here is the one instance document:
https://github.com/hannestschofenig/tschofenig-ids/blob/master/additional-data/xml/emergencyCall.SubInfo-example.xml

I hope I got it right.

So, I could put the vCard XML schema into the draft.

Ciao
Hannes

---

From: Brian Rosen <[email-masked]>
Date: Wed, 1 May 2013 17:29:13 -0400

I'll look it over, but I think you should put it in the draft.

Brian
On May 1, 2013, at 5:22 PM, Hannes Tschofenig <[email-masked]> wrote:

> Hi Brian,
> 
> I converted the vCard Relax NG schema into an XML schema (using trang and changed it slightly) and incorporated it into one of the XML schemas from the draft.
>

---

From: "Winterbottom, James" <[email-masked]>
Date: Thu, 2 May 2013 05:52:28 +0800

As a non-normative appendix.

-----Original Message-----
From: [email-masked] [mailto:[email-masked]] On Behalf Of Brian Rosen
Sent: Thursday, 2 May 2013 7:29 AM
To: Hannes Tschofenig
Cc: [email-masked]
Subject: Re: [Ecrit] Additional Data: XML Schema and Instance Documents

Brian

---

From: Brian Rosen <[email-masked]>
Date: Wed, 1 May 2013 20:06:29 -0400

non normative?  How do you get interoperability?

---

From: "Winterbottom, James" <[email-masked]>
Date: Thu, 2 May 2013 08:19:52 +0800

The XSD at the back of LoST is non-normative. Why is this different?

---

From: Brian Rosen <[email-masked]>
Date: Thu, 2 May 2013 09:11:52 -0400

Because the normative schema is in section 15.   In 5222 the normative schema is Relax NG, and they provide an informative xsd in the appendix.

Of course, with XCard the normative Relax NG schema is in 6351, but in this case, we have a normative XSD in the body of the document, and we need a normative XSD for the XCard somewhere.

If we changed the entire doc to Relax NG and provided non-normative xsd for that in an appendix, then a non-normative appendix for the XCard could be included.

The appendix, if normative, should include text that says that this does not change 6351 in any way.

I would venture to guess this is not the first time this problem has arisen and we should be able to get guidance.

Brian

---

From: Martin Thomson <[email-masked]>
Date: Thu, 2 May 2013 10:25:35 -0700

> Of course, with XCard the normative Relax NG schema is in 6351, but in this case, we have a normative XSD in the body of the document, and we need a normative XSD for the XCard somewhere.

Not true.  A normative schema might be necessary, but for this the
RelaxNG in 6351 is sufficient.

The XSD is a validation and implementation convenience.  Include the
XSD to inform readers that this (not the RelaxNG) was used to
construct and validate the examples.  This XSD can't be normative
unless you want to update 6351.  Don't do that.

---

From: Hannes Tschofenig <[email-masked]>
Date: Thu, 02 May 2013 22:12:16 +0300

You guys are all correct.

First, there is no need to have any XML / Relax NG schema to accomplish 
interoperability.

Second, in LoST we provided two types of Relax NG schemas: Section 15 of 
RFC 5222 specifies the compact Relax NG schema and Appendix A of RFC 
5222 has the "verbose" version of the Relax NG schema version of it (for 
improved readability - whatever that means with schemas anyway).

In this specific case we could, as Martin suggested, include the XML 
schema in the document but indicate that the normative version is in RFC 
6351.

I am fine with that approach.

I will prepare an update; there are still a number of other review 
comments to address.

Ciao
Hannes

---

From: "Winterbottom, James" <[email-masked]>
Date: Fri, 3 May 2013 04:13:27 +0800

Thanks Martin this was entirely my point.