This schema has (most of) the MUST conditions required of a SOAP document. v.0.3 2000-10-21 Rick Jelliffe, Francis Norton
For documentation, please refer to http://www.w3.org/TR/SOAP/
| /* | ||
| /soap-env:Envelope | The Envelope is the top element of the XML document representing the message. | |
| //soap-env:Envelope | The element MUST be present in a SOAP message | |
| string-length(namespace::*) = 0 | The <name path=""/> element MAY contain additional sub elements. If present these elements MUST be namespace-qualified. | |
| soap-env:Header | ||
| parent::soap-env:Envelope and (count(preceding-sibling::*) = 0) | The <name path=""/> element MAY be present in a SOAP message. If present, the element MUST be the first immediate child element of a SOAP Envelope element. | |
| string-length(namespace::*) = 0 | All immediate child elements of the SOAP Header element MUST be namespace-qualified. | |
| soap-env:Body | ||
| parent::soap-env:Envelope and (count(preceding-sibling::*) = 0 or (count(preceding-sibling::*) =1 and preceding-sibling::soap-env:Header)) | The <name path=""/> element MUST be present in a SOAP message and MUST be an immediate child element of a SOAP Envelope element. It MUST directly follow the SOAP Header element if present. Otherwise it MUST be the first immediate child element of the SOAP Envelope element. | |
| count(soap-env:Body) < 2 | The SOAP Fault element MUST NOT appear more than once within a Body element. | |
| soap-env:Fault | ||
| parent::soap-env:Body | The SOAP Fault element MUST appear as a body entry. | |
| parent::soap-env:faultcode | The faultcode MUST be present in a SOAP Fault element | |
| parent::soap-env:faultstring | The faultstring MUST be present in a SOAP Fault element | |
| string-length(namespace::*) = 0 | The <name path=""/> element MAY contain additional sub elements. If present these elements MUST be namespace-qualified. | |
| (../../soap-env:Header/*[@actor]) and faultfactor | Applications that do not act as the ultimate destination of the SOAP message MUST include the faultactor element in a SOAP Fault element. (Omitting the SOAP actor attribute indicates that the recipient is the ultimate destination of the SOAP message.) | |
| faultcode | ||
| parent::soap-env:Fault | The faultcode element is intended for use by software to provide an algorithmic mechanism for identifying the fault. The faultcode MUST be present in a SOAP Fault element | |
| string-length(.) > 0 | The faultcode value MUST be a qualified name. | |
| faultstring | ||
| parent::soap-env:Fault | The faultstring element is intended to provide a human readable explanation of the fault and is not intended for algorithmic processing. The faultstring MUST be present in a SOAP Fault element | |
| string-length(.) > 0 | The faultstring SHOULD provide some information explaining the nature of the fault. | |
| faultfactor | ||
| parent::soap-env:Fault | The faultactor element is intended to provide information about who caused the fault to happen within the message path. The faultfactor MAY be present in a SOAP Fault element | |
| string-length(.) > 0 | The value of the faultfactor attribute is a URI identifying the source. | |
| detail | ||
| parent::soap-env:Fault | The detail element is intended for carrying application specific error information related to the Body element. The detail MAY be present in a SOAP Fault element | |
| string-length(namespace::*) = 0 | The <name path=""/> element MAY contain additional sub elements. If present these elements MUST be namespace-qualified. | |
| *[@soap-env:mustUnderstand] | ||
| parent::soap-env:Header | The recipient of a SOAP message MUST ignore all mustUnderstand attributes that are not applied to an immediate child element of the SOAP Header element. | |
| ( @soap-env:mustUnderstand = 1) or (@soap-env:mustUnderstand = 0) | The value of the mustUnderstand attribute is either "1" or "0" | |
| *[@soap-env:actor] | ||
| parent::soap-env:Header | The recipient of a SOAP message MUST ignore all actor attributes that are not applied to an immediate child element of the SOAP Header element. | |
Schematron Pretty by Rick Jelliffe. The Schematron by Rick Jelliffe, Academia Sinica Computing Centre.