Login   Register  
PHP Classes
elePHPant
Icontem

File: nav.xsd

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Anthony Rogers  >  XMLnav  >  nav.xsd  >  Download  
File: nav.xsd
Role: Auxiliary data
Content type: text/plain
Description: Style Rules for xml
Class: XMLnav
Creates a menu bar from a definition in XML
Author: By
Last change: Changes to version numbering
Date: 6 years ago
Size: 3,566 bytes
 

Contents

Class file image Download
<?xml version="1.0" encoding="UTF-8"?>
<!--
/*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - *\
 * Copyright (C) 2004-2005 Anthony K Rogers roggyadres@hotmail.com			* 
 *											* 
 * This file is part of XMLmenu. It gives a quick example of how it is implemented	* 
 *											* 
 * version 1.0										* 
 * copyright 2004									* 
\*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
-->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
 <xs:attributeGroup name="always">
  <xs:attribute name="name" type="xs:string" use="required" />
  <xs:attribute name="url" type="xs:string" use="optional" />
  <xs:attribute name="level" type="xs:integer" use="required" />
 </xs:attributeGroup>

 <xs:attributeGroup name="sub_menu">
  <xs:attribute name="menuname" type="xs:string" use="required" />
  <xs:attributeGroup ref="always" />
 </xs:attributeGroup>

 <xs:attributeGroup name="sub_sub_menu">
  <xs:attribute name="item" type="xs:string" use="required" />
  <xs:attributeGroup ref="sub_menu" />
 </xs:attributeGroup>

 <xs:complexType name="zmnuItem">
  <xs:attribute name="item" type="xs:string" use="required" />
  <xs:attributeGroup ref="always" />
 </xs:complexType>

 <xs:complexType name="smnuItem">
  <xs:attributeGroup ref="sub_menu" />
 </xs:complexType>

 <xs:complexType name="mnuItem">
  <xs:attributeGroup ref="always" />
  <xs:attribute name="menuname" type="xs:string" use="optional" />
 </xs:complexType>

 <xs:complexType name="smnuMenu">
  <xs:choice minOccurs="0" maxOccurs="unbounded">
   <xs:element minOccurs="0" maxOccurs="unbounded" name="item" type="zmnuItem" />
   <xs:element minOccurs="0" maxOccurs="unbounded" name="link" type="link" />
   <xs:element minOccurs="0" maxOccurs="unbounded" name="email" type="email" />
  </xs:choice>
  <xs:attributeGroup ref="sub_sub_menu" />
 </xs:complexType>

 <xs:complexType name="mnuMenu">
  <xs:choice minOccurs="0" maxOccurs="unbounded">
   <xs:element minOccurs="0" maxOccurs="unbounded" name="item" type="smnuItem" />
   <xs:element minOccurs="0" maxOccurs="unbounded" name="menu" type="smnuMenu" />
   <xs:element minOccurs="0" maxOccurs="unbounded" name="link" type="link" />
   <xs:element minOccurs="0" maxOccurs="unbounded" name="email" type="email" />
  </xs:choice>
  <xs:attributeGroup ref="sub_menu" />
 </xs:complexType>

 <xs:complexType name="link">
  <xs:attributeGroup ref="always" />
  <xs:attribute name="target" type="xs:string" use="optional" />
 </xs:complexType>

 <xs:complexType name="email">
  <xs:attribute name="name" type="xs:string" use="required" />
  <xs:attribute name="username" type="xs:string" use="required" />
  <xs:attribute name="server" type="xs:string" use="required" />
  <xs:attribute name="level" type="xs:integer" use="required" />
 </xs:complexType>

 <xs:element name="menuBar">
  <xs:complexType>
   <xs:choice minOccurs="0" maxOccurs="unbounded">
    <xs:element minOccurs="0" maxOccurs="unbounded" name="item" type="mnuItem" />
    <xs:element minOccurs="0" maxOccurs="unbounded" name="menu" type="mnuMenu" />
    <xs:element minOccurs="0" maxOccurs="unbounded" name="link" type="link" />
    <xs:element minOccurs="0" maxOccurs="unbounded" name="email" type="email" />
   </xs:choice>
   <xs:attribute name="baseUrl" type="xs:string" use="required" />
   <xs:attribute name="basePage" type="xs:string" use="optional" />
  </xs:complexType>
 </xs:element>
</xs:schema>