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

<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
   targetNamespace="urn:hornetq"
   xmlns="urn:hornetq"
   elementFormDefault="qualified"
   attributeFormDefault="unqualified"
   version="1.0">
   
   <xsd:element name="configuration">
   	<xsd:complexType>
   		<xsd:sequence>
            <xsd:element name="mask-password" type="xsd:boolean" maxOccurs="1" minOccurs="0"></xsd:element>
            <xsd:element name="password-codec" type="xsd:string" maxOccurs="1" minOccurs="0"></xsd:element>
            <xsd:element name="defaultuser" type="userType" maxOccurs="1" minOccurs="0"></xsd:element>
            <xsd:element name="user" type="userType" maxOccurs="unbounded" minOccurs="0"></xsd:element>
   		</xsd:sequence>
   	</xsd:complexType>
   </xsd:element>

   <xsd:element name="role">
   	<xsd:complexType>
   		<xsd:attribute name="name" type="xsd:string" use="required"></xsd:attribute>
   	</xsd:complexType>
   </xsd:element>

   <xsd:complexType name="userType">
   	<xsd:sequence>
   		<xsd:element ref="role" maxOccurs="unbounded" minOccurs="1"></xsd:element>
   	</xsd:sequence>
   	<xsd:attribute name="name" type="xsd:ID" use="required"></xsd:attribute>
   	<xsd:attribute name="password" type="xsd:string"></xsd:attribute>
   </xsd:complexType>
</xsd:schema>
