Skip to content
Snippets Groups Projects
Commit 77d1f8b6 authored by Goik Martin's avatar Goik Martin
Browse files

DTD- Schema

parent a5bb7384
No related branches found
No related tags found
No related merge requests found
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:vc="http://www.w3.org/2007/XMLSchema-versioning" elementFormDefault="qualified"
vc:minVersion="1.0" vc:maxVersion="1.1">
<xs:element name="memo">
<xs:complexType>
<xs:sequence>
<xs:element name="from" type="xs:string"/>
<xs:element name="to" minOccurs="1" maxOccurs="unbounded" type="xs:string"/>
<xs:element name="subject" type="xs:string"/>
<xs:element name="content" type="xs:string"/>
</xs:sequence>
<xs:attribute name="date" type="xs:date" use="required"/>
<xs:attribute name="priority" type="Priority" use="optional"/>
</xs:complexType>
</xs:element>
<xs:simpleType name="Priority">
<xs:restriction base="xs:string">
<xs:enumeration value="low"/>
<xs:enumeration value="medium"/>
<xs:enumeration value="high"/>
</xs:restriction>
</xs:simpleType>
</xs:schema>
<!-- A first draft for a memo's grammar -->
<!--
<!ELEMENT memo (from, to+, subject, content)>
<!ATTLIST memo
date CDATA #REQUIRED
priority (low|medium|high) #IMPLIED>
<!ELEMENT from (#PCDATA)>
<!ELEMENT to (#PCDATA)>
<!ELEMENT subject (#PCDATA)>
<!ELEMENT content (#PCDATA)>
-->
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE memo SYSTEM "memo.dtd">
<memo date="10.02.2006" priority="high">
<memo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="memo.xsd"
date="2014-09-24" priority="high">
<from>M. Goik</from>
<to>B. King</to>
<to>A. June</to>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment