Some 'more, in-depth' information on Oracle BPEL PM, ESB and other SOA, day2day things

Monday, March 06, 2006

Another new feature: Oracle BPEL and Schematron validation

For all those not knowing what Schematron is, it's about content based validation for xml (see here for more info)

Here is a little example, let's consider the following instance XML:

<add sum="6">
<item>2</item>
<item>4</item>
</add>

The validation rule we want to apply is:
The value of the ‘sum’ attribute of ‘add’ must equal the sum of all the
‘item’ elements.


And the schematron code looks like this:

<sch:schema xmlns:sch="http://www.ascc.net/xml/schematron">
<sch:pattern name="Check sum">
<sch:rule context="add">
<sch:assert test="@sum = sum(item)">
The value of the sum attribute should
be the sum of all the values in the
item child elements.
</sch:assert>
</sch:rule>
</sch:pattern>
</sch:schema>


Cool, really cool .. The power of Schematron is the ability of context based, cross document validation, you are able to do domain validation (like is Author a in my external list of allowed authors)

So what we are doing in BPEL with it? We integrated to it (and leverage it as external service) - and with BPEL PM 10.1.3 it will be avaiable as part of the bpel infrastructure - ready to use.

And of course preparing a nice sample on how to leverage this feature

If anyone out there is interested in a preview of this - pls. let me know, and
I'll send out my little sample, beta tag'ed :-)

Having questions? send your feedback on Schematron integration here

0 Comments:

Post a Comment

<< Home