diff _test/Resources/test.schema @ 9:5899df8c289e

DOM schema
author Sergey
date Thu, 27 Aug 2009 17:49:42 +0400
parents
children 63f6653b094e
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/_test/Resources/test.schema	Thu Aug 27 17:49:42 2009 +0400
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="utf-8"?>
+<schema>
+    <Include src="basic.types.schema"/>
+    <TypeNodeMapping>
+        <ListBox type="IMPL::Web::Control::ListBox"/>
+        <RadioList type="IMPL::Web::Control::RadioList"/>
+        <EditBox type="IMPL::Web::Control::EditBox"/>
+        <DateTimeBox type="IMPL::Web::Control::EditBox"/>
+    </TypeNodeMapping>
+    <ComplexNode nodeName="Form">
+        <NodeSet>
+            <SimpleNode nodeName="FirstName">
+                <Regexp>\w+</Regexp>
+            </SimpleNode>
+            <SimpleNode nodeName="LastName">
+                <Regexp>\w+</Regexp>
+            </SimpleNode>
+            <TypeNode nodeName="BirthDate" type="DateTime" />
+            <TypeNode nodeName="Email" type="Email" minOccur="0" maxOccur="unbounded" />
+            <ComplexNode nodeName="AviaTicket" minOccur="0">
+                <TypeNode nodeName="From" type="Airport" control="ListBox" datasource="Airports"/>
+                <TypeNode nodeName="To" type="Airport" >
+                    <DiffersFrom query="From"/>
+                </TypeNode>
+            </ComplexNode>
+        </NodeSet>
+    </ComplexNode>
+    <Type typeName="DateTime" deriveFrom="SimpleNode">
+        <Regexp>\d{4}-\d{2}-\d{2}((T|\s)\d{2}\:\d{2}:\d{2})?</Regexp>
+    </Type>
+</schema>
\ No newline at end of file