Working with Namespaces and Schemas

Slides:



Advertisements
Similar presentations
1 Web Data Management XML Schema. 2 In this lecture XML Schemas Elements v. Types Regular expressions Expressive power Resources W3C Draft:
Advertisements

1 XML DTD & XML Schema Monica Farrow G30
Tutorial 9 Working with XHTML
Tutorial 9 Working with XHTML. XP Objectives Describe the history and theory of XHTML Understand the rules for creating valid XHTML documents Apply a.
Sunday, June 28, 2015 Abdelali ZAHI : FALL 2003 : XML Schemas XML Schemas Presented By : Abdelali ZAHI Instructor : Dr H.Haddouti.
Tutorial 11 Creating XML Document
XP New Perspectives on XML, 2nd Edition Tutorial 2 1 TUTORIAL 2 WORKING WITH NAMESPACES.
Unit 4 – XML Schema XML - Level I Basic.
Introduction to XML This material is based heavily on the tutorial by the same name at
Processing of structured documents Spring 2003, Part 3 Helena Ahonen-Myka.
Working with Namespaces Combining XML Vocabularies in a Compound Document.
XML 2nd EDITION Tutorial 2 Working With Namespaces.
WORKING WITH NAMESPACES
XP New Perspectives on XML Tutorial 4 1 XML Schema Tutorial – Carey ISBN Working with Namespaces and Schemas.
Tutorial 3: XML Creating a Valid XML Document. 2 Creating a Valid Document You validate documents to make certain necessary elements are never omitted.
XP New Perspectives on XML Tutorial 3 1 DTD Tutorial – Carey ISBN
Validating DOCUMENTS with DTDs
XP Tutorial 9New Perspectives on Creating Web Pages with HTML, XHTML, and XML 1 Working with XHTML Creating a Well-Formed Valid Document Tutorial 9.
Introduction to XML cs3505. References –I got most of this presentation from this site –O’reilly tutorials.
Why XML ? Problems with HTML HTML design - HTML is intended for presentation of information as Web pages. - HTML contains a fixed set of markup tags. This.
VICTORIA UNIVERSITY OF WELLINGTON Te Whare Wananga o te Upoko o te Ika a Maui SWEN 432 Advanced Database Design and Implementation XML Schema 1 Lecturer.
1 XML Schemas. 2 Useful Links Schema tutorial links:
Neminath Simmachandran
XML CPSC 315 – Programming Studio Fall 2008 Project 3, Lecture 1.
Document Type Definitions Kanda Runapongsa Dept. of Computer Engineering Khon Kaen University.
XP 1 DECLARING A DTD A DTD can be used to: –Ensure all required elements are present in the document –Prevent undefined elements from being used –Enforce.
1 Tutorial 13 Validating Documents with DTDs Working with Document Type Definitions.
Avoid using attributes? Some of the problems using attributes: Attributes cannot contain multiple values (child elements can) Attributes are not easily.
Of 33 lecture 3: xml and xml schema. of 33 XML, RDF, RDF Schema overview XML – simple introduction and XML Schema RDF – basics, language RDF Schema –
Beginning XML 4th Edition. Chapter 5: XML Schemas.
New Perspectives on XML, 2nd Edition
XML Schema. Why Schema? To define a class of XML documents Serve same purpose as DTD “Instance document" used for XML document conforming to schema.
XML Instructor: Charles Moen CSCI/CINF XML  Extensible Markup Language  A set of rules that allow you to create your own markup language  Designed.
XP New Perspectives on XML, 2nd Edition Tutorial 2 1 TUTORIAL 2 WORKING WITH NAMESPACES.
XML – Part III. The Element … This type of element either has the element content or the mixed content (child element and data) The attributes of the.
An Introduction to XML Sandeep Bhattaram
XML Introduction. What is XML? XML stands for eXtensible Markup Language XML stands for eXtensible Markup Language XML is a markup language much like.
Sheet 1XML Technology in E-Commerce 2001Lecture 2 XML Technology in E-Commerce Lecture 2 Logical and Physical Structure, Validity, DTD, XML Schema.
XML 2nd EDITION Tutorial 4 Working With Schemas. XP Schemas A schema is an XML document that defines the content and structure of one or more XML documents.
1 Tutorial 14 Validating Documents with Schemas Exploring the XML Schema Vocabulary.
Tutorial 13 Validating Documents with Schemas
1 Tutorial 12 Working with Namespaces Combining XML Vocabularies in a Compound Document.
Processing of structured documents Spring 2003, Part 3 Helena Ahonen-Myka.
Internet & World Wide Web How to Program, 5/e. © by Pearson Education, Inc. All Rights Reserved.2.
XML Validation II Schemas Robin Burke ECT 360. Outline Namespaces Documents  Data types XML Schemas Elements Attributes Derived data types RELAX NG.
XML Module 1 Creating an XML Document. XP Objectives Session 1.1 – Describe the history of XML and the uses of XML documents – Understand XML vocabularies.
1 Compound Documents: Combining XML Vocabularies.
XSD: XML Schema Language Kanda Runapongsa Dept. of Computer Engineering Khon Kaen University.
XML Schema Definition (XSD). Definition of a Schema It is a model for describing the structure and content of data The XML Schema was developed as a content.
XP Tutorial 9New Perspectives on HTML and XHTML, Comprehensive 1 Working with XHTML Creating a Well-Formed Valid Document Tutorial 9.
Tutorial 2: XML Working with Namespaces. 2 Name Collision This figure shows two documents each with a Name element.
XML Validation II Advanced DTDs + Schemas Robin Burke ECT 360.
Tutorial 9 Working with XHTML. XP Objectives Describe the history and theory of XHTML Understand the rules for creating valid XHTML documents Apply a.
CITA 330 Section 4 XML Schema. XML Schema (XSD) An alternative industry standard for defining XML dialects More expressive than DTD Using XML syntax Promoting.
Web Services: Principles & Technology Slide 3.1 Chapter 3 Brief Overview of XML COMP 4302/6302.
4 Copyright © 2004, Oracle. All rights reserved. Validating XML by Using XML Schema.
Creating a Well-Formed Valid Document
Tutorial 9 Working with XHTML
Tutorial 9 Working with XHTML
WORKING WITH NAMESPACES
XML QUESTIONS AND ANSWERS
Data Modeling II XML Schema & JAXB Marc Dumontier May 4, 2004
Tutorial 9 Working with XHTML
Namespace Review 21-Nov-18.
ece 720 intelligent web: ontology and beyond
Namespace Review 29-Dec-18.
New Perspectives on XML
Document Type Definition (DTD)
Namespace Review 14-Oct-19.
New Perspectives on XML
Presentation transcript:

Working with Namespaces and Schemas New Perspectives on XML Tutorial 4

Working with Namespaces Name collision occurs when elements from two or more documents share the same name. Name collision is not a problem if you are not concerned with validation. The document content only needs to be well-formed. However, name collision will keep a document from being validated. New Perspectives on XML Tutorial 4

Name Collision This figure shows two documents each with a Name element New Perspectives on XML Tutorial 4

Working with Namespaces Example of the collision of Name element <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE Collection [ <!ELEMENT Collection (Book, Author)> <!ELEMENT Book (Name, Publisher)> <!ELEMENT Name (#PCDATA)> <!ELEMENT Publisher (#PCDATA)> <!ELEMENT Author (Name, Address)> <!ELEMENT Name (First, Last)> <!ELEMENT First (#PCDATA)> <!ELEMENT Last (#PCDATA)> <!ELEMENT Address (#PCDATA)> ]> New Perspectives on XML Tutorial 4

Working with Namespaces Example of the collision of Name element <Collection> <Book> <Name>XML data integration</Name> <Publisher>Mcgro</Publisher> </Book> <Author> <Name> <First>Alice</First> <Last>Jay</Last> </Name> <Address>New York</Address> </Author> </Collection> New Perspectives on XML Tutorial 4

Layout of the UHOSP.XML Document This figure shows the structure of the UHSOP.xml file and the collision between the Name element. New Perspectives on XML Tutorial 4

Using Namespaces to Avoid Name Collision This figure shows how to use a namespace to avoid collision New Perspectives on XML Tutorial 4

New Perspectives on XML Declaring a Namespace A namespace is a defined collection of element and attribute names. Names that belong to the same namespace must be unique. Elements can share the same name if they reside in different namespaces. Namespaces must be declared before they can be used. New Perspectives on XML Tutorial 4

New Perspectives on XML Declaring a Namespace A namespace can be declared in the prolog or as an element attribute. The syntax to declare a namespace in the prolog is: <?xml:namespace ns=“URI” prefix=“prefix”?> Where URI is a Uniform Resource Identifier that assigns a unique name to the namespace, and prefix is a string of letters that associates each element or attribute in the document with the declared namespace. New Perspectives on XML Tutorial 4

New Perspectives on XML Declaring a Namespace For example, <?xml:namespace ns=http://uhosp/patients/ns prefix=“pat”?> Declares a namespace with the prefix “pat” and the URI http://uhosp/patients/ns. The URI is not a Web address. A URI identifies a physical or an abstract resource. New Perspectives on XML Tutorial 4

New Perspectives on XML URIs, URLs, and URNs A physical resource is a resource one can access and work with such as a file, a Web page, or an e-mail address. A URL is one type of URI. An abstract resource is one that doesn’t have any physical existence, the URI is used as an identifier or an ID. The URI http://uhosp/patients/ns is simply a text identifier. New Perspectives on XML Tutorial 4

New Perspectives on XML URIs, URLs, and URNs A proposed type of URI is the URN or Universal Resource Name. A URN is a persistent resource identifier, meaning the user need only know the name of a resource. An agency would then retrieve a copy of the resource independent of its location. URNs take the form: urn:NID:NSS New Perspectives on XML Tutorial 4

Applying a Namespace to an Element Once it has been declared and its URI specified, the namespace is applied to elements and attributes by inserting the namespace prefix before each element name that belongs to the namespace. <prefix:element> content </prefix:element> Here, prefix is the namespace prefix and element is the local part of the element name. New Perspectives on XML Tutorial 4

Applying a Namespace to an Element Prefixed names are called qualified names and an element name without a namespace prefix is called an unqualified name. Qualified names can be added to a document using code entered directly into the document. However, the more common way is to add the xmlns attribute to an element. New Perspectives on XML Tutorial 4

Declaring a Namespace as an Element Attribute The syntax is: xmlns:prefix=“URI” Where prefix and URI are the prefix and URI for the namespace. New Perspectives on XML Tutorial 4

Declaring a Namespace as an Element Attribute For example, the code: <pat:Patients xmlns:pat=“http://uhosp/patients/ns”> <Patient> <Name>Cynthia Dibbs</Name> <ID>MR890-041-02</ID> <DOB>1945-05-22</DOB> <Age>58</Age> <Stage>II</Stage> <Performance Scale=“Karnofsky”>0.81</Performance> </Patient> </pat:Patients> New Perspectives on XML Tutorial 4

Declaring a Namespace as an Element Attribute …applies the namespace http://uhosp/patients/ns namespace to the Patient element and all of its child elements. While the “pat” prefix was only added to the Patients element name, the XML parser considers the other elements parts of the Patients namespace and they inherit the namespace. New Perspectives on XML Tutorial 4

Declaring a Namespace as an Element Attribute They are unqualified elements, though, because they lack a namespace prefix. Declaring a namespace by adding it as an attribute of the document’s root element places all elements in the namespace. All elements thus are children of the root element. New Perspectives on XML Tutorial 4

Declaring a Default Namespace You can specify a default namespace by omitting the prefix in the namespace declaration. The element containing the namespace attribute and all of its child elements are assumed to be part of the default namespace. New Perspectives on XML Tutorial 4

Declaring a Default Namespace Example of declaring a default Namespace <Patients xmlns=“http://uhosp/patients/ns”> <Patient> <Name>Cynthia Dibbs</Name> <ID>MR890-041-02</ID> <DOB>1945-05-22</DOB> <Age>58</Age> <Stage>II</Stage> </Patient> …. </Patients> New Perspectives on XML Tutorial 4

Using Namespaces with Attributes Attributes, like elements, can become qualified by adding the namespace prefix to the attribute name. For example, prefix:attribute=“value” New Perspectives on XML Tutorial 4

Using Namespaces with Attributes No element may contain two attributes with the same name. No element may contain two qualified attribute names with the same local part, pointing to identical namespaces, even if the prefixes are different. New Perspectives on XML Tutorial 4

Using Namespaces with Attributes Example of Invalid Namespaces <Document xmlns:pat1=“http:/uhosp/patients/ns” xmlns:pat2=“http:/uhosp/patients/ns” <Name pat1:att1=“1” pat1:att1=“2” /> <Name pat1:att1=“1” pat2:att1=“2” /> </Document> New Perspectives on XML Tutorial 4

New Perspectives on XML Namespaces and DTDs Documents that contain namespaces must follow the same rules for XML validity as ones without namespaces. An xmlns attribute used to declare a namespace must be included in the DTD, declared as a fixed value. New Perspectives on XML Tutorial 4

New Perspectives on XML Namespaces and DTDs Example of XML document using Namespaces <Collection> <Book xmlns="http://cs.buu.ac.th"> <Name>XML data integration</Name> <Publisher>Mcgro</Publisher> </Book> <Au:Author xmlns:Au="http://www.buu.ac.th"> <Au:Name> <Au:First>Alice</Au:First> <Au:Last>Jay</Au:Last> </Au:Name> <Au:Address>New York</Au:Address> </Au:Author> </Collection> New Perspectives on XML Tutorial 4

New Perspectives on XML Namespaces and DTDs Example of XML document using Namespaces <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE Collection [ <!ELEMENT Collection (Book, Au:Author)> <!ELEMENT Book (Name, Publisher)> <!ATTLIST Book xmlns CDATA #FIXED "http://cs.buu.ac.th"> <!ELEMENT Name (#PCDATA)> <!ELEMENT Publisher (#PCDATA)> <!ELEMENT Au:Author (Au:Name, Au:Address)> <!ATTLIST Au:Author xmlns:Au CDATA #FIXED "http://www.buu.ac.th"> <!ELEMENT Au:Name (Au:First, Au:Last)> <!ELEMENT Au:First (#PCDATA)> <!ELEMENT Au:Last (#PCDATA)> <!ELEMENT Au:Address (#PCDATA)> ]> New Perspectives on XML Tutorial 4

New Perspectives on XML Schemas A schema is an XML document that defines the content and structure of one or more XML documents. The XML document containing the content is called the instance document. New Perspectives on XML Tutorial 4

Comparing Schemas and DTDs This figure compares schemas and DTDs New Perspectives on XML Tutorial 4

New Perspectives on XML Schema Dialects There is no single schema form. Several schema “dialects” have been developed in the XML language. Support for a particular schema depends on the XML parser being used for validation. New Perspectives on XML Tutorial 4

Schema Dialects This figure shows a few schema dialects New Perspectives on XML Tutorial 4

New Perspectives on XML Starting a Schema File A schema is always placed in a separate XML document that is referenced by the instance document. XML Schema is stored in files with the .xsd extension XDR schema is stored in files with the .xdr New Perspectives on XML Tutorial 4

New Perspectives on XML Starting a Schema File Root element of XML schema is named “schema” <xsd:schema xmlns:xsd=“http://www.w3.org/2001/XMLSchema”> document specifications </xsd:schema> New Perspectives on XML Tutorial 4

Elements and Attributes of the Patient Document This figure shows the elements and attributes of the Patient document New Perspectives on XML Tutorial 4

New Perspectives on XML Schema Types XML Schema recognize two categories of element types: complex and simple. A complex type element has one or more attributes, or is the parent to one or more child elements. A simple type element contains only character data and has no attributes. New Perspectives on XML Tutorial 4

Schema Types This figure shows types of elements New Perspectives on XML Tutorial 4

New Perspectives on XML Simple Type Elements Use the following syntax to declare a simple type element in XML Schema: <element name=“name” type =“type”/> Here, name is the name of the element in the instance document and type is the data type of the element. A namespace prefix can also be used <xsd:element name=“name” type=“xsd:type”/> New Perspectives on XML Tutorial 4

Understanding Data Types XML Schema supports two data types: built-in and user-derived. A built-in data type is part of the XML Schema specifications and is available to all XML Schema authors. A user-derived data type is created by the XML Schema author for specific data values in the instance document. New Perspectives on XML Tutorial 4

Understanding Data Types Built-in data types can be divided into primitive and derived data type. A primitive data type, also called a base type, is one of 19 fundamental data types not defined in terms of other types. A derived data type is a collection of 25 data types that the XML Schema developers created based on the 19 primitive types. New Perspectives on XML Tutorial 4

Understanding Data Types This figure shows the 44 built-in data types New Perspectives on XML Tutorial 4

Understanding Data Types This figure shows a partial description of XML Schema data types New Perspectives on XML Tutorial 4

Understanding Data Types Example of the limitation of Age element to only positive integers <element name=“Age” type=“positiveInteger” /> Example of element Age in XML document <Age>29</Age> New Perspectives on XML Tutorial 4

New Perspectives on XML Complex Type Elements The syntax for complex type elements is: <element name=“name”> <complexType> compositor element declarations attribute declarations </complexType> </element> New Perspectives on XML Tutorial 4

New Perspectives on XML Complex Type Elements Here, name is the name of the element in the instance document, element declarations are simple type element declarations for each child element, compositors define how the list of elements is to be organized, and attribute declarations define any of the attributes of the elements. New Perspectives on XML Tutorial 4

New Perspectives on XML Compositors A compositor is a schema tag that defines how the list will be treated. Three types of compositors are supported: sequence, choice, and all. The sequence compositor forces elements to be entered in the same order as indicated in the schema. New Perspectives on XML Tutorial 4

New Perspectives on XML Compositors The choice compositor allows any one of the items in the list to be used. The all compositor allows any of the items to appear in any order. Compositors may be nested inside of one another. New Perspectives on XML Tutorial 4

Compositors <element name="name"> <complexType> Example of sequence compositor <element name="name"> <complexType> <sequence> <element name="first" type="string" /> <element name="last" type="string" /> <element name="age" type="positiveInteger" /> </sequence> </complexType> </element> sequence.xsd New Perspectives on XML Tutorial 4

Compositors Example of XML document conforming to schema1.xsd <name xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.wrox.com/name sequence.xsd"> <first>David</first> <last>Joe</last> <age>29</age> </name> sequence.xml New Perspectives on XML Tutorial 4

Compositors <element name="Sponsor" > <complexType> Example of choice compositor <element name="Sponsor" > <complexType> <choice> <element name="Parent" type="string" /> <element name="Guardian" type="string" /> </choice> </complexType> </element> choice.xsd New Perspectives on XML Tutorial 4

Compositors <element name="Family"> <complexType> Example of all compositor <element name="Family"> <complexType> <all> <element name="Father" type="string" /> <element name="Mother" type="string" /> </all> </complexType> </element> all.xsd New Perspectives on XML Tutorial 4

Compositors mix.xsd Example of mix compositor <element name="Account"> <complexType> <sequence> <choice> <element name="Person" type="string" /> <element name="Company" type="string" /> </choice> <element name="Cash" type="string" /> <element name="Credit" type="string" /> </sequence> </complexType> </element> mix.xsd New Perspectives on XML Tutorial 4

Specifying the Occurrences of an Item To specify that Phone element appears zero to three times <element name= " Phone" type="string" minOccurs="0" maxOccurs="3" /> Ex. of declaring Phone in XML document <Phone>2344233</Phone> <Phone>2232212</Phone> <Phone>2334544</Phone> New Perspectives on XML Tutorial 4

Specifying the Occurrences of an Item To specify sequence of three child elements (FirstName, MiddleName, LastName) can be repeated countless times <element name="Customer"> <complexType> <sequence minOccurs=“1" maxOccurs="unbounded"> <element name="FirstName" type="string" /> <element name="MiddleName" type="string" /> <element name="LastName" type="string" /> </sequence> </complexType> </element> New Perspectives on XML Tutorial 4

Declaring an Attribute Any element that contains an attribute is also a complex type. The syntax to declare an attribute is: <attribute name=“name” type=“type” use=“use” default=“default” fixed=“fixed”/> New Perspectives on XML Tutorial 4

Declaring an Attribute Attributes with Empty Elements <Patient ID=“MR89-8901-25” Gender=“female” /> Can be declared as <element name=“Patient”> <complexType> <attribute name=“ID” type=“string” /> <attribute name=“Gender” type=“string” default=“female”/> </complexType> </element> New Perspectives on XML Tutorial 4

Declaring an Attribute Attributes with Child Elements <Patient ID=“MR89-8901-25” Gender=“female” > <Name>Cynthia Dibbs</Name> <Age>58</Age> </Patient> New Perspectives on XML Tutorial 4

Declaring an Attribute Can be declared as <element name=“Patient”> <complexType> <sequence> <element name=“Name” type=“string” /> <element name=“Age” type=“positiveInteger” /> </sequence> <attribute name=“ID” type=“string” /> <attribute name=“Gender” type=“string” default=“female”/> </complexType> </element> New Perspectives on XML Tutorial 4

Declaring an Attribute Attributes with Simple Elements <Patient PID=“MR89-8901-25”>Cynthia Dibbs</Patient> <element name=“Patient”> <complexType> <simpleContent> <extension base=“string”> <attribute name=“PID” type=“ID” /> </extension> </simpleContent> </complexType> </element> New Perspectives on XML Tutorial 4

New Perspectives on XML Reviews New Perspectives on XML Tutorial 4

Attaching a Schema to a Namespace By attaching a schema to a namespace, each part of the combined document can be associated with a different namespace and can draw upon a different schema for validation. The schemas are combined when the data are combined. New Perspectives on XML Tutorial 4

Validating a Combined Document This figure shows how schemas are combined when the data is combined New Perspectives on XML Tutorial 4

Attaching a Schema to a Namespace The syntax to associate the schema with a namespace is: <prefix:schema xmlns:prefix=http://www.w3.org/2001/ XMLSchema xmlns=“URI” targetNamespace=“URI”> New Perspectives on XML Tutorial 4

Attaching a Schema to a Namespace Here, URI is the URI for the schema’s namespace. The schema element has two namespaces. The first is for the W3C’s XML Schema specifications. The second is a namespace for the validation rules declared in this particular schema file. New Perspectives on XML Tutorial 4

New Perspectives on XML Structuring a Schema Schemas can be structured in a number of ways. One structure is called a Russian Doll design. This design involves sets of nested declarations. While this design makes it easy to associate the schema with the instance document, it can be confusing and difficult to maintain. New Perspectives on XML Tutorial 4

Russian Doll Design This figure shows a Russian Doll design New Perspectives on XML Tutorial 4

New Perspectives on XML Structuring a Schema Another schema design is a Flat Catalog Design. In this design, all element declarations are made globally. The structure of the instance document is created by referencing the global element declarations. The syntax is: <element ref=“name”> New Perspectives on XML Tutorial 4

Flat Catalog Design This figure shows a Flat Catalog design New Perspectives on XML Tutorial 4

New Perspectives on XML Named Schema Elements A structure can be named creating a named complex type that can be used elsewhere in the schema. This has the advantage of “storing” the structure so it can be applied to the type attribute. New Perspectives on XML Tutorial 4

New Perspectives on XML Named Model Groups A named model group is a collection of elements. The syntax is: <group name=“name”> element declarations </group> The element declarations must be enclosed within a sequence, all compositor, or choice. New Perspectives on XML Tutorial 4

Named Attribute Groups Attributes can be placed within named attribute groups. The syntax is: <attributeGroup name=“name”> attribute declarations </attributeGroup> This can be useful if you want to use attributes with several different elements in the schema. New Perspectives on XML Tutorial 4

Comparing Schema Designs This figure compares the three schema designs New Perspectives on XML Tutorial 4

Deriving New Data Types Three components are involved in deriving new data types: Value space: the set of values that correspond to the data type. Lexical space: the set of textual representations of the value space. Facets: the properties of the data type that distinguish one data type from another. New Perspectives on XML Tutorial 4

New Perspectives on XML User Derived Data New data types fall into three categories: List: a list of values where each list is derived from a base type. Union: the combination of two or more data types. Restriction: a limit placed on the facet of a base type. New Perspectives on XML Tutorial 4

Deriving a Restricted Data Type The most common way to derive a new data type is to restrict the properties of a base type. XML Schema provides twelve constraining facets for this purpose. New Perspectives on XML Tutorial 4

Constraining Facets This figure shows the 12 constraining facets New Perspectives on XML Tutorial 4

New Perspectives on XML The Patterns Facet A pattern can be created with a formatted text string called a regular expression or regex. The basic unit of a regex is called an atom. It can be a single character, a group of characters, or another regex enclosed in parenthesis. A quantifier can be added to the atom to specify the number of occurrences for a particular character. New Perspectives on XML Tutorial 4

Pattern Quantifiers This figure shows pattern quantifiers New Perspectives on XML Tutorial 4

New Perspectives on XML Annotating a Schema It is helpful to include comments about a created schema for other XML developers. An annotation element stores information about the schema. The syntax is: <annotation> <documentation> documentation comments </documentation> <appinfo> application information </appinfo> </annotation> New Perspectives on XML Tutorial 4