summaryrefslogtreecommitdiff
path: root/framework
diff options
context:
space:
mode:
authorxue <>2006-02-21 19:32:36 +0000
committerxue <>2006-02-21 19:32:36 +0000
commit2f29591dc5a20086ad2c0e4e3689f7c0b9ab7b02 (patch)
tree6c5310695c2cc8dd47c4b7d6a36e68649d732c10 /framework
parentbc8fcfba51fd93330d3c1855d7f948c53c8a1968 (diff)
Added DTD and XSD for app and page configurations.
Diffstat (limited to 'framework')
-rw-r--r--framework/Specs/ApplicationConfiguration.dtd40
-rw-r--r--framework/Specs/ApplicationConfiguration.xsd200
-rw-r--r--framework/Specs/PageConfiguration.dtd54
-rw-r--r--framework/Specs/PageConfiguration.xsd143
4 files changed, 437 insertions, 0 deletions
diff --git a/framework/Specs/ApplicationConfiguration.dtd b/framework/Specs/ApplicationConfiguration.dtd
new file mode 100644
index 00000000..b85a0595
--- /dev/null
+++ b/framework/Specs/ApplicationConfiguration.dtd
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- This is the XML Schema Definition for the application.xml file used in Prado/3 framework. -->
+<!-- @package prado.config -->
+<!-- @author Robert Kummer <r.kummer@ipunkt.biz> -->
+<!-- @since Prado/3.0b rev688 -->
+<!-- @version 1.0/2006-02-21 -->
+<!ELEMENT application (paths, modules, services, parameters)>
+<!ATTLIST application
+ id CDATA #REQUIRED
+ Mode (Off | Debug | Normal | Performance) #REQUIRED
+>
+<!ELEMENT paths (alias? | using?)+>
+<!ELEMENT modules (module+)>
+<!ELEMENT services (service+)>
+<!ELEMENT parameters (parameter+)>
+<!ELEMENT module (#PCDATA)>
+<!ATTLIST module
+ id CDATA #REQUIRED
+ class CDATA #REQUIRED
+>
+<!ELEMENT parameter (#PCDATA)>
+<!ATTLIST parameter
+ id CDATA #REQUIRED
+ class CDATA #IMPLIED
+ value CDATA #IMPLIED
+>
+<!ELEMENT alias EMPTY>
+<!ATTLIST alias
+ id CDATA #REQUIRED
+ path CDATA #REQUIRED
+>
+<!ELEMENT using EMPTY>
+<!ATTLIST using
+ namespace CDATA #REQUIRED
+>
+<!ELEMENT service (#PCDATA)>
+<!ATTLIST service
+ id CDATA #REQUIRED
+ class CDATA #REQUIRED
+>
diff --git a/framework/Specs/ApplicationConfiguration.xsd b/framework/Specs/ApplicationConfiguration.xsd
new file mode 100644
index 00000000..c66dfed5
--- /dev/null
+++ b/framework/Specs/ApplicationConfiguration.xsd
@@ -0,0 +1,200 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!-- This is the XML Schema Definition for the config.xml file(s) used in Prado/3 framework. -->
+<!-- @package prado.config -->
+<!-- @author Robert Kummer <r.kummer@ipunkt.biz> -->
+<!-- @since Prado/3.0b rev688 -->
+<!-- @version 1.0/2006-02-21 -->
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+ <xs:complexType name="aliasType">
+ <xs:attribute name="id" use="required">
+ <xs:simpleType>
+ <xs:restriction base="xs:string"/>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="path" use="required">
+ <xs:simpleType>
+ <xs:restriction base="xs:string"/>
+ </xs:simpleType>
+ </xs:attribute>
+ </xs:complexType>
+ <xs:complexType name="allowType">
+ <xs:attribute name="pages" use="optional">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:pattern value="(([a-zA-Z0-9_\-]*),?)+"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="users" use="optional">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:pattern value="(([a-zA-Z0-9_\-|\*|\?]*),?)+"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="roles" use="optional">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:pattern value="(([a-zA-Z0-9_\-]*),?)+"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="verb" use="required">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="get"/>
+ <xs:enumeration value="post"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ </xs:complexType>
+ <xs:complexType name="authorizationType">
+ <xs:sequence>
+ <xs:element name="allow" type="allowType"/>
+ <xs:element name="deny" type="denyType"/>
+ </xs:sequence>
+ </xs:complexType>
+ <xs:element name="configuration">
+ <xs:annotation>
+ <xs:documentation>configuration content for page sections in prado3 framework</xs:documentation>
+ </xs:annotation>
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="paths" type="pathsType" minOccurs="0"/>
+ <xs:element name="modules" type="modulesType" minOccurs="0"/>
+ <xs:element name="authorization" type="authorizationType" minOccurs="0"/>
+ <xs:element name="pages" type="pagesType" minOccurs="0"/>
+ <xs:element name="parameters" type="parametersType" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:complexType name="denyType">
+ <xs:attribute name="pages" use="optional">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:pattern value="(([a-zA-Z0-9_\-]*),?)+"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="users" use="optional">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:pattern value="(([a-zA-Z0-9_\-|\*|\?]*),?)+"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="roles" use="optional">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:pattern value="(([a-zA-Z0-9_\-]*),?)+"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="verb" use="required">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="post"/>
+ <xs:enumeration value="get"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ </xs:complexType>
+ <xs:complexType name="moduleType">
+ <xs:attribute name="id" use="required">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="ModuleID"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="class" use="required">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="ModuleClass"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:anyAttribute namespace="##local" processContents="lax"/>
+ </xs:complexType>
+ <xs:complexType name="modulesType">
+ <xs:sequence>
+ <xs:element name="module" maxOccurs="unbounded">
+ <xs:complexType>
+ <xs:complexContent>
+ <xs:extension base="moduleType">
+ <xs:sequence minOccurs="0" maxOccurs="unbounded">
+ <xs:any namespace="##local" processContents="lax"/>
+ </xs:sequence>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+ </xs:element>
+ </xs:sequence>
+ </xs:complexType>
+ <xs:complexType name="pageType">
+ <xs:attribute name="id" use="required">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="PageID"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:anyAttribute namespace="##local" processContents="lax"/>
+ </xs:complexType>
+ <xs:complexType name="pagesType">
+ <xs:sequence>
+ <xs:element name="page" type="pageType" maxOccurs="unbounded"/>
+ </xs:sequence>
+ <xs:attribute name="MasterClass" type="xs:string" use="optional"/>
+ <xs:attribute name="Theme" type="xs:string" use="optional"/>
+ <xs:anyAttribute namespace="##local" processContents="lax"/>
+ </xs:complexType>
+ <xs:complexType name="parameterType">
+ <xs:attribute name="id" use="required">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="ParameterID"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="class" use="optional">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="ParameterClass"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="value" type="xs:string" use="optional"/>
+ <xs:anyAttribute namespace="##local" processContents="lax"/>
+ </xs:complexType>
+ <xs:complexType name="parametersType">
+ <xs:sequence>
+ <xs:element name="parameter" maxOccurs="unbounded">
+ <xs:complexType>
+ <xs:complexContent>
+ <xs:extension base="parameterType">
+ <xs:sequence minOccurs="0" maxOccurs="unbounded">
+ <xs:any namespace="##local" processContents="lax"/>
+ </xs:sequence>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+ </xs:element>
+ </xs:sequence>
+ </xs:complexType>
+ <xs:complexType name="pathsType">
+ <xs:choice maxOccurs="unbounded">
+ <xs:element name="alias" type="aliasType" minOccurs="0"/>
+ <xs:element name="using" type="usingType" minOccurs="0"/>
+ </xs:choice>
+ </xs:complexType>
+ <xs:complexType name="usingType">
+ <xs:attribute name="namespace" use="required">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="Namespace"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ </xs:complexType>
+</xs:schema>
diff --git a/framework/Specs/PageConfiguration.dtd b/framework/Specs/PageConfiguration.dtd
new file mode 100644
index 00000000..e140f468
--- /dev/null
+++ b/framework/Specs/PageConfiguration.dtd
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- This is the XML Schema Definition for the config.xml file(s) used in Prado/3 framework. -->
+<!-- @package prado.config -->
+<!-- @author Robert Kummer <r.kummer@ipunkt.biz> -->
+<!-- @since Prado/3.0b rev688 -->
+<!-- @version 1.0/2006-02-21 -->
+<!ELEMENT allow EMPTY>
+<!ATTLIST allow
+ pages CDATA #IMPLIED
+ users CDATA #IMPLIED
+ roles CDATA #IMPLIED
+ verb (get | post) #REQUIRED
+>
+<!ELEMENT deny EMPTY>
+<!ATTLIST deny
+ pages CDATA #IMPLIED
+ users CDATA #IMPLIED
+ roles CDATA #IMPLIED
+ verb (post | get) #REQUIRED
+>
+<!ELEMENT configuration (paths?, modules?, authorization?, pages?, parameters?)>
+<!ELEMENT paths (alias? | using?)+>
+<!ELEMENT modules (module+)>
+<!ELEMENT authorization (allow, deny)>
+<!ELEMENT pages (page+)>
+<!ATTLIST pages
+ MasterClass CDATA #IMPLIED
+ Theme CDATA #IMPLIED
+>
+<!ELEMENT parameters (parameter+)>
+<!ELEMENT module (#PCDATA)>
+<!ATTLIST module
+ id (ModuleID) #REQUIRED
+ class (ModuleClass) #REQUIRED
+>
+<!ELEMENT page EMPTY>
+<!ATTLIST page
+ id (PageID) #REQUIRED
+>
+<!ELEMENT parameter (#PCDATA)>
+<!ATTLIST parameter
+ id (ParameterID) #REQUIRED
+ class (ParameterClass) #IMPLIED
+ value CDATA #IMPLIED
+>
+<!ELEMENT alias EMPTY>
+<!ATTLIST alias
+ id CDATA #REQUIRED
+ path CDATA #REQUIRED
+>
+<!ELEMENT using EMPTY>
+<!ATTLIST using
+ namespace (Namespace) #REQUIRED
+>
diff --git a/framework/Specs/PageConfiguration.xsd b/framework/Specs/PageConfiguration.xsd
new file mode 100644
index 00000000..c1d9a1ef
--- /dev/null
+++ b/framework/Specs/PageConfiguration.xsd
@@ -0,0 +1,143 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!-- This is the XML Schema Definition for the application.xml file used in Prado/3 framework. -->
+<!-- @package prado.config -->
+<!-- @author Robert Kummer <r.kummer@ipunkt.biz> -->
+<!-- @since Prado/3.0b rev688 -->
+<!-- @version 1.0/2006-02-21 -->
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+ <xs:complexType name="aliasType">
+ <xs:attribute name="id" use="required">
+ <xs:simpleType>
+ <xs:restriction base="xs:string"/>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="path" use="required">
+ <xs:simpleType>
+ <xs:restriction base="xs:string"/>
+ </xs:simpleType>
+ </xs:attribute>
+ </xs:complexType>
+ <xs:element name="application">
+ <xs:annotation>
+ <xs:documentation>configuration content for the whole application in prado3 framework</xs:documentation>
+ </xs:annotation>
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="paths" type="pathsType"/>
+ <xs:element name="modules" type="modulesType"/>
+ <xs:element name="services" type="servicesType"/>
+ <xs:element name="parameters" type="parametersType"/>
+ </xs:sequence>
+ <xs:attribute name="id" type="xs:string" use="required"/>
+ <xs:attribute name="Mode" use="required">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="Off"/>
+ <xs:enumeration value="Debug"/>
+ <xs:enumeration value="Normal"/>
+ <xs:enumeration value="Performance"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:anyAttribute namespace="##local" processContents="lax"/>
+ </xs:complexType>
+ </xs:element>
+ <xs:complexType name="moduleType">
+ <xs:attribute name="id" use="required">
+ <xs:simpleType>
+ <xs:restriction base="xs:string"/>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="class" use="required">
+ <xs:simpleType>
+ <xs:restriction base="xs:string"/>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:anyAttribute namespace="##local" processContents="lax"/>
+ </xs:complexType>
+ <xs:complexType name="modulesType">
+ <xs:sequence>
+ <xs:element name="module" maxOccurs="unbounded">
+ <xs:complexType>
+ <xs:complexContent>
+ <xs:extension base="moduleType">
+ <xs:sequence minOccurs="0" maxOccurs="unbounded">
+ <xs:any namespace="##local" processContents="lax"/>
+ </xs:sequence>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+ </xs:element>
+ </xs:sequence>
+ </xs:complexType>
+ <xs:complexType name="parameterType">
+ <xs:attribute name="id" use="required">
+ <xs:simpleType>
+ <xs:restriction base="xs:string"/>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="class" use="optional">
+ <xs:simpleType>
+ <xs:restriction base="xs:string"/>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="value" type="xs:string" use="optional"/>
+ <xs:anyAttribute namespace="##local" processContents="lax"/>
+ </xs:complexType>
+ <xs:complexType name="parametersType">
+ <xs:sequence>
+ <xs:element name="parameter" maxOccurs="unbounded">
+ <xs:complexType>
+ <xs:complexContent>
+ <xs:extension base="parameterType">
+ <xs:sequence minOccurs="0" maxOccurs="unbounded">
+ <xs:any namespace="##local" processContents="lax"/>
+ </xs:sequence>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+ </xs:element>
+ </xs:sequence>
+ </xs:complexType>
+ <xs:complexType name="pathsType">
+ <xs:choice maxOccurs="unbounded">
+ <xs:element name="alias" type="aliasType" minOccurs="0"/>
+ <xs:element name="using" type="usingType" minOccurs="0"/>
+ </xs:choice>
+ </xs:complexType>
+ <xs:complexType name="serviceType">
+ <xs:attribute name="id" use="required">
+ <xs:simpleType>
+ <xs:restriction base="xs:string"/>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="class" use="required">
+ <xs:simpleType>
+ <xs:restriction base="xs:string"/>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:anyAttribute namespace="##local" processContents="lax"/>
+ </xs:complexType>
+ <xs:complexType name="servicesType">
+ <xs:sequence>
+ <xs:element name="service" maxOccurs="unbounded">
+ <xs:complexType>
+ <xs:complexContent>
+ <xs:extension base="serviceType">
+ <xs:sequence minOccurs="0" maxOccurs="unbounded">
+ <xs:any namespace="##local" processContents="lax"/>
+ </xs:sequence>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+ </xs:element>
+ </xs:sequence>
+ </xs:complexType>
+ <xs:complexType name="usingType">
+ <xs:attribute name="namespace" use="required">
+ <xs:simpleType>
+ <xs:restriction base="xs:string"/>
+ </xs:simpleType>
+ </xs:attribute>
+ </xs:complexType>
+</xs:schema>