Wednesday, 31 March 2010

CMT3315 – Laboratory 13 – 20 January ’10

Quick Questions

1. A "complex type" Defines a complex type element whereas a "simple type" defines a simple type.
Simple type specifies the constraints and information about the values of attributes or text only elements, Whereas a complex type can contains elements and children’s.

2. XML schema's are defined as XML documents, can be checked by XML parser and edited by XML editor which is why it is advantageous.

3.Three random predefined data types within XML schema definition Language are as follows: -
1. String
2. Date
3. Double

Longer Questions: -
1.

xmlns:xs="http://www.w3.org/2001/XMLSchema"

The component above specifies the namespace "http://www.w3.org/2001/XMLSchema" where the data types and elements come from.The namespace is prefixed with xs.

<xs:=schema

The above component specifies the root element and as you can see is a start tag which will require an end tag at the end of the document



2. a)

<?xml version="1.0"?>

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"

</xs:schema>




b)


c)

<xs:complex Type name=”electronice_payment_type”>

</xs:element>

<xs:element Type name”electronic_payment_type”/>

<xs:sequence>

<xs:element name”Sender”type=”institution_type”/>

<xs:element name”Reciever”type=”institution_type”/>

<xs:element name”Transaction”type=”institution_type”

maxOccurs=”unbounded”/>

</xs:sequence>



d)

e)



f)

xs:complexType name=”transection_type”

xs:all>

xs:slement name=”number” type=”xs:integer”/>

xs:element name=”amount”>

xs:simpleType>

xs:restrcition base=”xs:decimal”>

xs:fractionDigits value”2”>

/xs:restriction>



xs:element name=”date” type=”xs:”>

xs:element name=”recounciled” type=”xs:boolean”>

/xs:all>



Lecture Reflection-WEEK 13 – 14 – XML DOM


The lecture reflection for this week is discussed in the blog for week 14
http://www.ronnysmarket.com/
http://www.ronnysmarket.com/catalog/main

No comments:

Post a Comment