![]() |
Validity of XML Document![]() ![]() ![]() ![]() ![]()
We have already discussed about valid documents in the second chapter. Saying
that a document is "valid" means that it fits within the described model
of a class of documents. If you are setting up a business to business process
with another company and if you have agreed to share information from your partners,
database,
you can validate the validity of the data using your XML schema. Invalid data formats can be rejected before they are inserted into your database. Using a schema and a validating parser offers a standard way to test your documents. Every document that you encounter can be defined in one of four ways: An XML document is not well formed. An XML document may be simply well formed if it does not identify a schema
to which it claims to conform. An XML document may be well formed and a valid one if a schema is associated with the document, and the document does not violate any of the constraints of that schema. There are basically two types of validity namely: Datatype Validity. <b>Content Model Validity</b> Content model validity tests whether the order and nesting of tags is correct or not. A LIB, for example, might be defined as having a required <TITLE> tag, one <AUTHOR> tag, a required <ISBN>, and a <PUBLISHER> tag. In the XML schema syntax, the content model of an address could be described
like this: <b>Syntax</b> XML schema documents are XML documents. This means that they use elements and attributes to express the semantics of the schema and that they can be edited and processed with the same tools that are used to process other XML documents. Vocabulary of an XML schema document comprises about thirty elements and attributes At the bottom, a schema describes the content of elements and attributes. Let us examine how our LIB element is declared in a schema. The LIB Element Type <elementType name= " LIB " > <mixed/> </elementType> This example defines the LIB element type. The term 'element type' is used to differentiate the actual element and the type of the element. The content of the <elementType> element defines the valid content of an element of that type. In the above example, the content type is <mixed/>which means that both characters and other element types can be part of the LIB element's contents. Now let us examine how an ISBN datatype is declared using the XML schema. This
actually demonstrates the datatyping power of an XML schema. The ISBN datatype
is a string, which contains exactly ten digits with hyphens separating the first
and the second elements and the fourth and the fifth elements.
|
|
Domain NamesXML HTML to XML Why XML? XML Example Program XML Structure XML Declaration Physical Structure in XML XML Syntax Well Formed and Valid Document Document Type Definition Logical Structures
Notation and Notation Declarations Entity References Importing an External DTD Cascading Style Sheets (XML) Rendering XML with CSS An Example Using CSS CSS Style Rules
XSL XSL Transformation XSL Formatting XSL Style Rules Schemas Limitations of DTD Validity of an XML Document
An Example using XML Schema Namespaces Xlinks and Xpointers Terminology Xlinks Extended Link Xpointers DOM and SAX What is DOM? The Basic Structure of an XML DOM-based Module What is SAX? When to use DOMWhen to use SAX Accessing the Database Using XML Delivering XML with Data Retrieving Data from SQL Database Using Web Assistant Wizard Displaying Records from the XML_EX Database Server Dynamic Web Publishing with Dynabase Enhydra Java/XML Application Server XML Server Technologies Purpose and Goal of the XML/EDI Guidelines Definitions for XML/EDI The Electronic Enterprise Server Scope of XML/EDI The Five Technologies of XML/EDI Integrating XML with EDI Ignore and Include Keywords XML/EDI Components The Implementation Process Identifying Data Sets Developing DTDs Application Specific Extensions XML and JAVA XML Application Architecture Channel Definition Format Creation of Channels Creating Channels Using CDF Document Description of the Channel Scheduling Logos Precaching Web Crawling Keeping Track of UsersWeb DesignWeb HostingE Commerce |
| Home | Web Hosting | Web Design | Sitemap |
| Copyright (C) 2007. Web Domain design hosting. All rights reserved. |