xml:base test case

Per my ACTION-204, here is a test scenario for xml:base

Store this document at http://@@@/common/Protection

<wsp:Policy
        xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"
        xmlns:wsp="http://www.w3.org/ns/ws-policy"
 
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
        wsu:Id="Protection" >
  <sp:EncryptSignature wsp:Optional="true" />
  <sp:ProtectTokens wsp:Optional="true" />
</wsp:Policy>

This policy expression references the expression above using a relative 
URI
with the xml:base expressed in the wsp:Policy element.

<wsp:Policy
        xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"
        xmlns:wsp="http://www.w3.org/ns/ws-policy" 
        xml:base="http://@@@/common/">
  <wsp:PolicyReference URI="Protection" />
  <sp:OnlySignEntireHeadersAndBody />
</wsp:Policy>

The resulting policy expression MUST normalize to:

<wsp:Policy
        xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"
        xmlns:wsp="http://www.w3.org/ns/ws-policy">
  <wsp:ExactlyOne>
    <wsp:All>
      <sp:OnlySignEntireHeadersAndBody />
      <sp:EncryptSignature wsp:Optional="true" />
      <sp:ProtectTokens wsp:Optional="true" />
    </wsp:All>
  </wsp:ExctlyOne>
</wsp:Policy>


Cheers,

Christopher Ferris
STSM, Software Group Standards Strategy
email: chrisfer@us.ibm.com
blog: http://www.ibm.com/developerworks/blogs/page/chrisferris
phone: +1 508 377 9295

Received on Wednesday, 14 February 2007 00:22:11 UTC