<?xml version="1.0" encoding="UTF-8"?>
<!--
  Licensed to the Apache Software Foundation (ASF) under one or more
  contributor license agreements.  See the NOTICE file distributed with
  this work for additional information regarding copyright ownership.
  The ASF licenses this file to You under the Apache License, Version 2.0
  (the "License"); you may not use this file except in compliance with
  the License.  You may obtain a copy of the License at

      http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
-->
<grammar datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"
         xmlns="http://relaxng.org/ns/structure/1.0">

<!-- ===================================================================

     Apache Cocoon Roles RELAX NG grammar (Version 0.1)

PURPOSE:
  DRAFT RELAX NG grammar for the Cocoon cocoon.roles configuration files.

NOTES:

FIXME:
- 

CHANGE HISTORY:
20021030 V0.1 Initial version. (DC)
==================================================================== -->
  <define name="role-list">
    <element name="role-list">
      <ref name="attlist.role-list"/>
      <oneOrMore>
        <ref name="role"/>
      </oneOrMore>
    </element>
  </define>
  <define name="attlist.role-list" combine="interleave">
    <empty/>
  </define>
  <define name="role">
    <element name="role">
      <ref name="attlist.role"/>
      <zeroOrMore>
        <ref name="hint"/>
      </zeroOrMore>
    </element>
  </define>
  <define name="hint">
    <element name="hint">
      <ref name="attlist.hint"/>
      <empty/>
    </element>
  </define>
  <define name="attlist.role" combine="interleave">
    <attribute name="name"/>
    <attribute name="shorthand"/>
    <optional>
      <attribute name="default-class"/>
    </optional>
  </define>
  <define name="attlist.hint" combine="interleave">
    <attribute name="shorthand"/>
    <attribute name="class"/>
  </define>
  <start>
    <choice>
      <ref name="role-list"/>
    </choice>
  </start>
</grammar>
