









































































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
This lecture was delivered by Bhavesh Verma for Bioinformatics Using Semantic Computing course at Bhagwant University Rajasthan. It includes: Structured, Web, Documents, XML, Schemas, Successors, Extensible, Support, Namespaces, Defines, Elements
Typology: Slides
1 / 81
This page cannot be seen from the preview
Don't miss anything!










































































2
XML Schemas are the Successors of DTDs
XML Schemas will be used in most Web applications
as a replacement for DTDs. Here are some reasons:
XML Schemas are extensible to future additions XML Schemas are richer and more powerful than DTDs XML Schemas are written in XML XML Schemas support data types XML Schemas support namespaces
An XML Schema:
defines elements that can appear in a document defines attributes that can appear in a document defines which elements are child elements defines the order of child elements defines the number of child elements defines whether an element is empty or can include text defines data types for elements and attributes defines default and fixed values for elements and attributes
5
It is easier to describe allowable document content It is easier to validate the correctness of data It is easier to work with data from a database It is easier to define data facets (restrictions on data) It is easier to define data patterns (data formats) It is easier to convert data between different data types
7
XML Schemas are extensible, because XML is extensible
With an extensible Schema definition you can: Reuse your Schema in other Schemas Create your own data types derived from the standard types Reference multiple schemas in the same document
8
Well-Formed is not Enough
A well-formed XML document is a document that conforms to the XML syntax rules, like: it must begin with the XML declaration it must have one unique root element start-tags must have matching end-tags elements are case sensitive all elements must be closed all elements must be properly nested all attribute values must be quoted entities must be used for special characters
10
Simple XML Document "note.xml":
Tove
Jani
Reminder
Don't forget me this weekend!
11
An XML Schema
13
Tove Jani Reminder Don'tforget me this weekend!
14
The element is the root element of every XML Schema:
... ...
16
The following fragment:
xmlns:xs= “http://www.w3.org/2001/XMLSchema”
Indicates that the elements and data types used in the
schema come from the “http://www.w3.org/2001/XMLSchema" namespace.
It also specifies that the elements and data types that come
from the “http://www.w3.org/2001/XMLSchema" namespace should be prefixed with xs:
17
targetNamespace="http://www.w3schools.com"
20