Subject: [Simple] XML schema for presence rules documents

From: Mircea Amarascu <[email-masked]>
Date: Fri, 13 Apr 2007 15:15:25 +0300

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.

_______________________________________________
Simple mailing list
[email-masked]
https://www1.ietf.org/mailman/listinfo/simple

---

From: Jari Urpalainen <[email-masked]>
Date: Fri, 13 Apr 2007 16:13:05 +0300

ext Mircea Amarascu wrote:
> element for a document that can be valid against the schema, it 
> results that documents like:
>
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