Re: [Simple] XML schema for presence rules documents

Jari Urpalainen <jari.urpalainen@nokia.com> Fri, 13 April 2007 13:13 UTC

Return-path: <simple-bounces@ietf.org>
Received: from [127.0.0.1] (helo=stiedprmman1.va.neustar.com) by megatron.ietf.org with esmtp (Exim 4.43) id 1HcLaW-0000YS-On; Fri, 13 Apr 2007 09:13:16 -0400
Received: from [10.91.34.44] (helo=ietf-mx.ietf.org) by megatron.ietf.org with esmtp (Exim 4.43) id 1HcLaV-0000Va-Hb for simple@ietf.org; Fri, 13 Apr 2007 09:13:15 -0400
Received: from smtp.nokia.com ([131.228.20.173] helo=mgw-ext14.nokia.com) by ietf-mx.ietf.org with esmtp (Exim 4.43) id 1HcLaU-0004px-2H for simple@ietf.org; Fri, 13 Apr 2007 09:13:15 -0400
Received: from esebh105.NOE.Nokia.com (esebh105.ntc.nokia.com [172.21.138.211]) by mgw-ext14.nokia.com (Switch-3.2.5/Switch-3.2.5) with ESMTP id l3DDClNG020745; Fri, 13 Apr 2007 16:13:10 +0300
Received: from esebh103.NOE.Nokia.com ([172.21.143.33]) by esebh105.NOE.Nokia.com with Microsoft SMTPSVC(6.0.3790.1830); Fri, 13 Apr 2007 16:13:08 +0300
Received: from esebh101.NOE.Nokia.com ([172.21.138.177]) by esebh103.NOE.Nokia.com with Microsoft SMTPSVC(6.0.3790.1830); Fri, 13 Apr 2007 16:13:07 +0300
Received: from mgw-int01.ntc.nokia.com ([172.21.143.96]) by esebh101.NOE.Nokia.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.1830); Fri, 13 Apr 2007 16:13:07 +0300
Received: from kusti.research.nokia.com (mgw.research.nokia.com [172.21.56.13]) by mgw-int01.ntc.nokia.com (Switch-3.2.5/Switch-3.2.5) with ESMTP id l3DDD5pe009907; Fri, 13 Apr 2007 16:13:06 +0300
Received: from [172.21.40.44] (esdhcp04044.research.nokia.com [172.21.40.44]) by kusti.research.nokia.com (Postfix) with ESMTP id B50D493B77; Fri, 13 Apr 2007 16:13:05 +0300 (EEST)
Message-ID: <461F81E1.2090208@nokia.com>
Date: Fri, 13 Apr 2007 16:13:05 +0300
From: Jari Urpalainen <jari.urpalainen@nokia.com>
User-Agent: Thunderbird 1.5.0.10 (X11/20070302)
MIME-Version: 1.0
To: ext Mircea Amarascu <mircea@ag-projects.com>
Subject: Re: [Simple] XML schema for presence rules documents
References: <461F745D.4090901@ag-projects.com>
In-Reply-To: <461F745D.4090901@ag-projects.com>
Content-Type: text/plain; charset="ISO-8859-1"; format="flowed"
Content-Transfer-Encoding: 7bit
X-OriginalArrivalTime: 13 Apr 2007 13:13:07.0476 (UTC) FILETIME=[7A2B1540:01C77DCD]
X-Nokia-AV: Clean
X-Spam-Score: 0.0 (/)
X-Scan-Signature: 52e1467c2184c31006318542db5614d5
Cc: simple@ietf.org
X-BeenThere: simple@ietf.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SIP for Instant Messaging and Presence Leveraging Extensions <simple.ietf.org>
List-Unsubscribe: <https://www1.ietf.org/mailman/listinfo/simple>, <mailto:simple-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www1.ietf.org/pipermail/simple>
List-Post: <mailto:simple@ietf.org>
List-Help: <mailto:simple-request@ietf.org?subject=help>
List-Subscribe: <https://www1.ietf.org/mailman/listinfo/simple>, <mailto:simple-request@ietf.org?subject=subscribe>
Errors-To: simple-bounces@ietf.org

ext Mircea Amarascu wrote:
> Hello,
>
> I have a question regarding the XML Schema that validates the presence 
> rules documents, schema
> defined in Section 6 of draft-ietf-simple-presence-rules-09
>
> Because XML Schema allows any global element to be a document root 
> element for a document that can be valid against the schema, it 
> results that documents like:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <provide-place-is 
> xmlns="urn:ietf:params:xml:ns:pres-rules">true</provide-place-is>
>
> are valid, though meaningless in regards to a complete presence rules 
> document containing conditions, actions and transformations sections.
>
> I could:
>
> 1. Validate the document against both presence rules and common policy 
> schemas, but that's inefficient.
> 2. Validate the document against the presence rules schema and then 
> check its root element is a "ruleset" one.
>
> Is there something that I miss here ?
>
> Thank you.
No, you are not missing anything here. The tool is just deficient. Even 
for describing content models it has quite many other shortcomings as 
well. But if you need to do runtime checks (which is not that 
self-evident either) you'd better use other tools, like relax, but then 
you need also those schemas. Alternatively, you could write also better 
combination schemas with w3c/xml schema, but there would still be some 
deficiency anyhow.
br, jari

_______________________________________________
Simple mailing list
Simple@ietf.org
https://www1.ietf.org/mailman/listinfo/simple