OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help



   Re: [xml-dev] XRules: Mind your own business rules

[ Lists Home | Date Index | Thread Index ]

>> -----Original Message-----
>> From: Mark Seaborne [mailto:mseaborne@origoservices.com]
>> I would concur with Roland Merrick on this issue. The XForms model has
>> great
>> potential as a way of defining distributable business rule sets (whether
>> or
>> not you need a form).
> I started reviewing ver 1.1 of the specs after Roland's comments. It's my
> feeling that a language to express business rules deserves to be a first
> class citizen in the standards world. If the XForms workgroup considers
> expanding on their dynamic model (add rule grouping mechanisms,
> context-sensitive embedding in XSD, standardized error reporting ...etc) and
> branching out the effort into a separate standard that works equally well
> with XForms and with other standards, then that would be something
> wonderful. How about it W3C?

It is certainly the intention of the XForms WG that the pieces of XForms
that are generally useful elsewhere, should be easy to adopt and adapt. For
example, we are currently looking at how Chapter 11 of XForms 1.0, dealing
with submission, can be broken out into its own spec. so that it can be used
independently of XForms. It certainly has been mooted in the past that the
XForms model is another thing of use outside the world of "traditional"

If you have further use cases and requirements of the XForms model I would
encourage you to submit them to the XForms WG.

As to grouping, well, an XForms model is a named grouping of rules, and it
is possible to nest rules within a model (though admittedly this is somewhat
broken in XForms 1.0).

As to error reporting, XForms defines specific help, hint and alert elements
(which can themselves be populated from resources external to the XForm).
These do not currently provide all of the functionality that you might
require, but this certainly is recognised as a problem that must be
>> The nice thing is that it the declarative rules are
>> designed to layer over an existing XML schema language (W3C XML Schema).
>> So
>> the XForms model could be seen as XSD extensions
> I'll read more about this, but what I know so far is that XForms uses the
> XML Schema data types. Is there more to it?
Well, yes considerably, as Roland's example hinted.

Firstly it is possible to assign simple types where there is no schema at
all, either using @xsi:type on an XML instance, or, perhaps more usefully,
using the XForms type attribute, thus:

<bind type="my:nonEmptyString" nodeset="/person-name/first-name"/>

The most obvious differences here are that you don't mess with your instance
data, and you can type attribute values too.

It is also possible to assign a simple type to a node that is already
assigned a type by a schema, so long as you don't invalidate the existing
constraint. This means that you can easily tighten existing constraints
(e.g. subset enumerations).

However, XForms also gives you the ability to define XPath based
constraints, in much the same way that Schematron already did (must be a
lesson there somewhere).

So, you can do the if node x has value 3 and node y exists then node z has a
value of "Do not Pass Go, Do not Collect 200 (currency of your choice)",
kind of thing.

Not only can you define validity, you can also define relevance. The
constraint above could just as easily have said, node z is not relevant.
This means that node z  (and any descendants) is pruned for as long as the
defined condition is true.

In fact XForms allows you to define and assign simple type, constraints,
relevance, calculated values, whether a node is read only, requiredness and
p3p type. All of these things are collectively known as Model Item
Properties (MIPs).

As an XForms model can reference as many XML instances as you like, it is
possible to define MIPs that cross root nodes.

As I mentioned before, my view is that XForms MIPs combined with W3C XML
Schema is very similar in effect to Schematron combined with Relax NG.

All the best


The information in this e-mail is sent in confidence for the addressee only and may be legally privileged. Unauthorised recipients must preserve this confidentiality and should please advise the sender immediately of the error in transmission and then delete this e-mail. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on its content is prohibited and may be unlawful.

Origo Services Limited accepts no responsibility for any loss or damage resulting directly or indirectly from the use of this e-mail or the contents.  It is your responsibility to scan for viruses.  Origo Services Limited reserves the right to monitor e-mails sent to or from addresses under its control.  When you reply to this e-mail, you are consenting to Origo Services Limited monitoring the content of the e-mails you send to or receive from Origo Services Limited.  If this e-mail is non-business related Origo Services Limited is not liable for any opinions expressed by the sender.  The contents of this e-mail are protected by copyright.  All rights reserved.


Origo Services Limited is a company incorporated in Scotland (company number 115061) having its registered office at 4th floor, Saltire Court, 20 Castle Terrace, Edinburgh EH1 2EN.


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS