# zxid/sg/ws-policy.sg
# Slightly edited, 3.3.2007, Sampo Kellomaki (sampo@iki.fi)
# $Id: ws-policy.sg,v 1.3 2009-09-05 02:23:41 sampo Exp $

target(wsp, http://schemas.xmlsoap.org/ws/2004/09/policy)
import(wsse, http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd, http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd)
import(wsu,  http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd, http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd)

Policy: base(wsp:OperatorContentType)
  @Name? -> %xs:anyURI
  @wsu:Id?
  @any? #  ns(##any)
  ;

All        -> %wsp:OperatorContentType
ExactlyOne -> %wsp:OperatorContentType

%OperatorContentType:
  wsp:Policy
  wsp:All?
  wsp:ExactlyOne?
  wsp:PolicyReference?
  any*  ns(##other)  processContents(lax)
  ;

PolicyReference:
  @URI -> %xs:anyURI
  @Digest? -> %xs:base64Binary
  @DigestAlgorithm? -> %xs:anyURI  #default (http://schemas.xmlsoap.org/ws/2004/09/policy/Sha1Exc)
  @any? #  ns(##any)
  ;

@Optional -> %xs:boolean  default (false)
@PolicyURIs: xs:anyURI* ;

PolicyAttachment:
  wsp:AppliesTo
  wsp:Policy?
  wsp:PolicyReference?
  any*  ns(##other)  processContents(lax)
  @any? #  ns(##any)
  ;

AppliesTo:
  any+  processContents(lax)
  @any? #  ns(##any)
  ;

#EOF
