This project has moved and is read-only. For the latest updates, please go here.

Documentation on the XmlSchema structure.

The Xsd's are build as a main structure (the Xsd to open with the editor) and one or more included Xsd's with re-usable structures and attrbute sets.

The tree shaped EWB structure allows for only one root node wich must be named 'ewb'.

NOTE: the targetNamespace of all Xsd's must be 'pimv2'. This is neccesary for the program and the inclusion of Xsd's to work properly.

<?xml version="1.0" encoding="utf-8" ?>
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" targetNamespace="pimv2" xmlns:xs="">
<xs:element name="EWB">

Reusable definitions are composed with the XmlSchema constructs:
  • 'simpleType',
  • 'complexType',
  • 'group'
  • 'attributeGroup'
When reusing with either the 'type' or 'ref' attribute, occurences have to be defined at the tag that reuses and not in its definition.

The value of the 'minOccurs' attribute maybe larger than 0 as long as it's less then 'maxOccurs'.
The attribute 'maxOccurs' may also contain the value 'unbounded'.

Both attributes are taken into account when a (sub) structure is added. If 'minOccurs' is one or more, the approriate number of elements is created.

References to and typing of elements can be done with a namespace definition like:
<xs:element xmlns:q1="pimv2" name="Introductie" type="q1:Introductie">.

NOTE: De element tag is niet toegestaan als toplevel node in deze include file en mag alleen gebruikt worden binnen een group of complexType!

All attributes must have a 'type' attribute, containing its datatype. Allowed values include a subset of available XmlSchema datatypes:
  1. xs:string
  2. xs:Name
  3. xs:int
  4. xs:float
  5. xs:double
and the EwbDesigner specific values:
  1. stringlist (list editor)
  2. text (multi-lne text editor)
  3. filename (browse file button)
  4. html (wysywig html editor)

<xs:attribute xmlns:q1="pimv2" name="tekst" type="x;string"/>


<xs:attribute xmlns:q1="pimv2" name="tekst" type="q1:html"/>

For defining the export format, an 'ExportAs' attribute with a fixed value can be added> The value refers to the method in the export script to be called and used during the export. For example:

<xs:attribute xmlns:q1="pimv2" name="ExportedAs" type="xs:string" fixed="Task"/>

defines that during export the method:

public static void ExportedAs_Tasks(XmlNode node)

is called to render the element. If the attribute or method is not present, a default method is used which name is a combination of 'ExportedAs_' and the 'Name' of the element.

Attributes can have default and fixed attrubutes and define a value. If the fixed attribute is used, the attribute will be shown as read-only in the EwbDesigner.

The title attribute (if present) will be shown in the tree containing the models structure, for example:

<xs:attribute xmlns:q1="pimv2" name="titel" type="xs:string" default="Vul hier casus titel in" />

Attribute order is (for readability/alignement) fixed like:
  1. the namespace even if not neccesary,
  2. name,
  3. type and
  4. fixed or default value.
so like:

<xs:attribute xmlns:q1="pimv2" name="ExportedAs" type="xs:string" fixed="List" />

NOTE: Adjacent choices may lead to problems when moving elements around.

Last edited Dec 2, 2009 at 9:50 AM by wvd_vegt, version 2


No comments yet.