Commit 603a6478 authored by Pietro Abate's avatar Pietro Abate

[r2003-11-28 09:27:21 by szach] - reviewed schema manual about import

- added schema document samples

- written schema manual about validation

Original author: szach
Date: 2003-11-28 09:27:21+00:00
parent 87c73b8d
......@@ -9,6 +9,7 @@
<include file="manual/expressions.xml"/>
<include file="manual/namespaces.xml"/>
<include file="manual/schema.xml"/>
<include file="manual/schema_samples.xml"/>
This Guide describes all CDuce's constructions.
This diff is collapsed.
<page name="manual_schema_samples">
<title>XML Schema sample documents</title>
<box title="Sample XML documents" link="sample">
All the examples you will see in the manual section regarding CDuce's XML
Schema support are related to the XML Schema Document <code>mails.xsd</code>
and to the XML Schema Instance <code>mails.xml</code> reported below.
<box title="mails.xsd" link="mails_xsd">
<!-- mails.xsd -->
<xsd:schema xmlns:xsd="">
<xsd:element name="mails" type="mailsType" />
<xsd:complexType name="mailsType">
<xsd:sequence minOccurs="0" maxOccurs="unbounded">
<xsd:element name="mail" type="mailType" />
<xsd:complexType name="mailType">
<xsd:element name="envelope" type="envelopeType" />
<xsd:element name="body" type="bodyType" />
<xsd:element name="attachment" type="attachmentType"
minOccurs="0" maxOccurs="unbounded" />
<xsd:attribute use="required" name="id" type="xsd:integer" />
<xsd:element name="header">
<xsd:extension base="xsd:string">
<xsd:attribute ref="name" use="required" />
<xsd:element name="Date" type="xsd:dateTime" />
<xsd:complexType name="envelopeType">
<xsd:element name="From" type="xsd:string" />
<xsd:element name="To" type="xsd:string" />
<xsd:element ref="Date" />
<xsd:element name="Subject" type="xsd:string" />
<xsd:element ref="header" minOccurs="0" maxOccurs="unbounded" />
<xsd:attribute name="From" type="xsd:string" use="required" />
<xsd:simpleType name="bodyType">
<xsd:restriction base="xsd:string" />
<xsd:complexType name="attachmentType">
<xsd:group ref="attachmentContent" />
<xsd:attribute ref="name" use="required" />
<xsd:group name="attachmentContent">
<xsd:element name="mimetype">
<xsd:attributeGroup ref="mimeTypeAttributes" />
<xsd:element name="content" type="xsd:string" minOccurs="0" />
<xsd:attribute name="name" type="xsd:string" />
<xsd:attributeGroup name="mimeTypeAttributes">
<xsd:attribute name="type" type="mimeTopLevelType" use="required" />
<xsd:attribute name="subtype" type="xsd:string" use="required" />
<xsd:simpleType name="mimeTopLevelType">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="text" />
<xsd:enumeration value="multipart" />
<xsd:enumeration value="application" />
<xsd:enumeration value="message" />
<xsd:enumeration value="image" />
<xsd:enumeration value="audio" />
<xsd:enumeration value="video" />
<box title="mails.xml" link="mails_xml">
<!-- mails.xml -->
<mail id="0">
<envelope From="">
<Subject>I desperately need XML Schema support in CDuce</Subject>
<header name="Reply-To"></header>
As subject says, is it possible to implement it?
<attachment name="signature.doc">
<mimetype type="application" subtype="msword"/>
### removed by spamoracle ###
<mail id="1">
<envelope From="">
<Subject>Re: I desperately need XML Schema support in CDuce</Subject>
<body> wrote:
> As subject says, is possible to implement it?
Sure, I'm working on it, in a few years^Wdays it will be finished
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment