XML SCHEMA full contact
Time: 2001/05/13 19:21 Author: onecenter Chinese XML Union
On May 2, 2001, after more than three years, XML's Schema finally became a fruit. In this way, XML, XML Schema and Namespace have become a formal standard for W3C. This is a historic moment worth celebrating, meaning XML syntax specification has laid a solid foundation. China XML Alliance introduces you the latest XML Schema standard and its application in MSXML 4.0.
XML Definition Language: DTD, XDR and XSD XML Schema's Sepament Use XSD Verify XML XML Schema and Name XML Definition Language: DTD, XDR and XSD We know that XML documents are formatted in format and have two constraints. The format is well suited for all XML documents, that is, to meet the provisions of the format in the XML standard. The XML document is called a valid XML document when the XML document satisfies certain semantic constraints. Currently used XML definition languages have DTD, XDR, and XSD. The Document Type Definition (DTD) Document Type Defines the content mode of the various elements in the XML document with independent grammar different from XML. This language directly follows the method of defining the SGML language. DTD allows the XML document to maintain consistent DTD to share DTD provides the formation and complete definition of XML communication. Each XML document has a single DTD to limit SCHEMA-like DTD, and Schema can specify a structure or model of a particular document. Using the SCHEMA language to describe the following benefits: SCHEMA uses XML syntax SCHEMA can use XML parsers to parse SCHEMA allows global elements (in the same way in the entire XML document) and local elements (Elements) There are different meanings in a particular context) SCHEMA provides a wealth of data types (such as integer, Boolean, date type, etc.); and the data type in an element can be regulated, and can even customize data type XDR xdr as needed. The full name is XML-Data Reduced Language, which is a branch that defines the XML language that is derived by the draft of XML-DATA. Since Microsoft proposes XML-DATA, and XDR is also widely used in its software after the application is revised. The products currently support XDR Schema include: Microsoft BizTalk Server Microsoft SQL Server 2000 Microsoft Office 2000 Microsoft IE5.0 and subsequent version XDR also gave support for ExtensIlity XML Authority Editing tools. XSD Schema's most formal XML Schema language is the XML Schema specification specified by W3C, referred to as XSD (XML Schema Definition). XSD also provides a method of support and structural definitions of data types. On May 2, 2001, the XML Schema specification became the formal recommendation standard for W3C. This means that after more than three years of development, XML's Schema standard finally repaired. In this way, XML, XML Schema and Namespace have become the formal of W3C. This is a historic moment worth celebrating, meaning the XML syntax specification has laid a solid foundation. The extensive development and application of XML will become a reality. Below we will focus on the latest XML Schema standard.
XML Schema's full picture
We use the actual example to introduce XML Schema's usage. For example, there is such an XML instance document: XML version = "1.0" encoding = "gb2312">
Moreover, its sub-elements are sequences of sequence, so this declaration Student element:
Use XSD check XML by XML Schema, you can use to verify the semantics and structure of the XML document. The MSXML 4.0 technology preview version has provided features with XSD Schema to verify the XML document. When you check the document, add Schema to the XMLschemacche object, set its object, SET The Schemas Property of A DomDocument object's Schemas property references to Schema in the XMLscheMacche object. The check operation is automatically performed when the XML document is loaded into the DomDocument object. We may use examples to explain how to implement an XML document check by programming in Visual Basic. These include: Books.xsd Schema books.xml used to verify the books.xml file will be loaded and the Books.xsd controls the Visual Basic check code to create an XMLSChemacache object, add Schema to it, then Set the Shemas property of the Schemas Property of the Domdocument object. In the beginning, you have to do the following: Open Visual Basic 6.0, select the Standard Exe New project Select References in the Project menu. Select Microsoft XML in the Available References list, V4.0 Add a Command button to Form1 to store the item books XML enters the following XML code in the XML editor or even a normal text editor, and stores Books.xml: XML Version = "1.0"?>
Messages XML Schema and Name Scherma are a collection of rules (also known as syntax or loubo), including type definitions (simple and complex types), and elements and attribute declarations. Different elements and properties may be described in XML, there is a need to use a named domain and a prefix to avoid ambiguity between elements and attribute statements. When you use Schema from multiple domains, the distinction element and attribute name are the most basic work. A name domain usually has a string to distinguishes each other, such as "http://www.xml.org.cn", "http://www.w3c.org/2001/ Xmlschema "and" UUID: 1234567890 ". XML Schema's preamble XML Schema is some introductory, which is the formal statement. Three optional properties may contain three options in the introduction of the SCHEMA element. For example, the SChema element used by the following syntax references three most commonly used named domains: