XML Schema defines the name vocabulary. : Introduction « XML Schema « XML Tutorial

XML Tutorial
1. Introduction
2. Namespace
3. XML Schema
4. XPath
5. XSLT stylesheet
Java
XML
Java Tutorial
Java Source Code / Java Documentation
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
C# / C Sharp
C# / CSharp Tutorial
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
XML Tutorial » XML Schema » Introduction 
3. 1. 2. XML Schema defines the name vocabulary.
It shows how to refer to the XML Schema from the instance document.
You used the XML Schema to determine whether your instance document was schema valid.

File: Schema.xsd

<?xml version="1.0"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema"
  xmlns:target="http://www.java2java.com/name"
  targetNamespace="http://www.java2java.com/name"
  elementFormDefault="qualified">
  <element name="name">
    <complexType>
      <sequence>
        <element name="first" type="string" />
        <element name="middle" type="string" />
        <element name="last" type="string" />
      </sequence>
      <attribute name="title" type="string" />
    </complexType>
  </element>
</schema>


File: Data.xsl

<?xml version="1.0"?>
<name xmlns="http://www.java2java.com/name"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://www.java2java.com/name name5.xsd"
  title="Mr.">
  <first>John</first>
  <middle>Joh</middle>
  <last>Doe</last>
</name>
3. 1. Introduction
3. 1. 1. Getting Started with XML Schemas
3. 1. 2. XML Schema defines the name vocabulary.
3. 1. 3.  Declarations
3. 1. 4.  element is the root element within an XML Schema.
3. 1. 5. Target Namespaces
3. 1. 6. Simple and Complex Types
3. 1. 7. Primitive Datatypes
3. 1. 8. Derived Datatypes
3. 1. 9. Useful built-in simple types
3. 1. 10. Create global complex types
3. 1. 11. Derivation by extension
3. 1. 12. Derivation by restriction
www.java2java.com | Contact Us
Copyright 2010 - 2030 Java Source and Support. All rights reserved.
All other trademarks are property of their respective owners.