<?xml version="1.0" encoding="UTF-8"?>

<xs:schema
        targetNamespace="urn:liberty:ims:2006-08"
        xmlns:sec="urn:liberty:security:2006-08"
        xmlns:xs="http://www.w3.org/2001/XMLSchema"
        xmlns:lu="urn:liberty:util:2006-08"
        xmlns="urn:liberty:ims:2006-08"
        elementFormDefault="qualified"
        attributeFormDefault="unqualified"
        >

  <xs:import
          namespace="urn:liberty:security:2006-08"
          schemaLocation="liberty-idwsf-security-mechanisms-v2.0.xsd"/>

  <xs:import namespace="urn:liberty:util:2006-08"
             schemaLocation="liberty-idwsf-utility-v2.0.xsd"/>

  <xs:annotation>
    <xs:documentation>
      The source code in this schema file was excerpted verbatim from:

      Liberty ID-WSF Liberty ID-WSF Authentication, Single Sign-On, and Identity Mapping Services Specification
      Version 2.0-errata-v1.0
      28 November, 2006

      Copyright (c) 2007 Liberty Alliance participants, see
      http://projectliberty.org/resource_center/specifications/liberty_alliance_id_wsf_2_0_specifications/idwsf_feb_copyrights

    </xs:documentation>
  </xs:annotation>

  <xs:element name="MappingInput" type="MappingInputType"/>
  <xs:complexType name="MappingInputType">
    <xs:sequence>
      <xs:element ref="sec:TokenPolicy" minOccurs="0"/>
      <xs:element ref="sec:Token" minOccurs="0"/>
    </xs:sequence>
    <xs:attribute name="reqID" type="lu:IDType" use="optional"/>
  </xs:complexType>

  <xs:element name="MappingOutput" type="MappingOutputType"/>
  <xs:complexType name="MappingOutputType">
    <xs:sequence>
      <xs:element ref="sec:Token"/>
    </xs:sequence>
    <xs:attribute name="reqRef" type="lu:IDReferenceType" use="optional"/>
  </xs:complexType>

  <xs:element name="IdentityMappingRequest" type="IdentityMappingRequestType"/>
  <xs:complexType name="IdentityMappingRequestType">
    <xs:sequence>
      <xs:element ref="MappingInput" maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:anyAttribute namespace="##other" processContents="lax"/>
  </xs:complexType>

  <xs:element name="IdentityMappingResponse" type="IdentityMappingResponseType"/>
  <xs:complexType name="IdentityMappingResponseType">
    <xs:sequence>
      <xs:element ref="lu:Status"/>
      <xs:element ref="MappingOutput" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:anyAttribute namespace="##other" processContents="lax"/>
  </xs:complexType>

</xs:schema>
