opencsa-liaison — archive
[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
— [Date Index]
| [Thread Index]
| [Month Index]
| [List Home]
Re: Schematron in SCA Specs - request for an example
Yours, Mike.
Strategist - Emerging Technologies, SCA & SDO.
Co Chair OASIS SCA Assembly TC.
IBM Hursley Park, Mail Point 146, Winchester, SO21 2JN, Great Britain.
Phone & FAX: +44-1962-818014 Mobile: +44-7802-467431
Email: [email protected]
Folks,
Here is a follow up regarding the proposal for Use of Schematron in the SCA Specifications:
This is from Danny van der Rijn of Tibco and his example relates to the BPEL specification:
First, let me be clear that I'm not suggesting on recasting parts of the SCA spec.
"PROPOSAL: Define SchemaTron rules in our specification that formalize the constraints that are now limited to either informal verbal constraints, or implied constraints. "
The point is to augment what is currently there with some formalism.
I'm attaching a schematron schema which enforces 3 simple rules expressed or implied in SCA-BPEL 3.3.
- a bpel:partnerLink may not have both an sca-bpel:service and an sca-bpel:reference
- an sca-bpel:service is only legal on a bpel:partnerLink
- an sca-bpel:reference is only legal on a bpel:partnerLink
This is to give you a flavor of what is possible. Other rules I would include from this section:
- the value of an sca-bpel:service must be unique
- the value of an sca-bpel:reference must be unique
That's a lot of rules for 14 lines of spec text, not one of which is formally encoded by our spec.
---------------------------------------
<?xml version="1.0" ?>
<schema xmlns="http://purl.oclc.org/dsdl/schematron">
<ns uri="http://docs.oasis-open.org/ns/opencsa/sca/200712" prefix="sca-bpel" />
<ns uri="http://docs.oasis-open.org/ns/opencsa/sca/200712" prefix="sca" />
<ns uri="http://docs.oasis-open.org/wsbpel/2.0/process/executable/" prefix="bpel" />
<!--
SCA-BPEL Section 3.3
-->
<pattern name="sca-bpel:service">
<rule context="*[@sca-bpel:service]">
<!--
sca-bpel:service can only appear on a bpel:partnerLink.
The 'value-of' is just to output the partnerLink's name
-->
<assert test="self::bpel:partnerLink">
<value-of select="@name" /> : An @sca-bpel:service may only appear on a bpel:partnerLink
</assert>
<!--
a bpel:partnerLink can't have both an sca-bpel:service and an sca-bpel:reference.
The 'value-of' is just to output the partnerLink's name
-->
<assert test="not(@sca-bpel:reference)">
<value-of select="@name" /> : A bpel:partnerLink can't have both an @sca-bpel:service and an @sca-bpel:reference
</assert>
</rule>
</pattern>
<pattern name="sca-bpel:reference">
<rule context="*[@sca-bpel:reference]">
<!--
sca-bpel:reference can only appear on a bpel:partnerLink.
The 'value-of' is just to output the partnerLink's name
-->
<assert test="self::bpel:partnerLink">
<value-of select="@name" /> : An sca-bpel:reference may only appear on a bpel:partnerLink
</assert>
</rule>
</pattern>
</schema>
-----------------------------------------
Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number 741598.
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU
[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
— [Date Index]
| [Thread Index]
| [Month Index]
| [List Home]