1. 程式人生 > >XML Schema Part 2: Datatypes Second Edition

XML Schema Part 2: Datatypes Second Edition

The [XML 1.0 (Second Edition)] specification defines limited facilities for applying datatypes to document content in that documents may contain or refer to DTDs that assign types to elements and attributes. However, document authors, including authors of traditional documents and those transporting data

in XML, often require a higher degree of type checking to ensure robustness in document understanding and data interchange.

The table below offers two typical examples of XML instances in which datatypes are implicit: the instance on the left represents a billing invoice, the instance on the right a memo or perhaps an email message in XML.

Data oriented Document oriented
<invoice>
  <orderDate>1999-01-21</orderDate>
  <shipDate>1999-01-25</shipDate>
  <billingAddress>
   <name>Ashok Malhotra</name>
   <street>123 Microsoft Ave.</street>
   <city>Hawthorne</city>
   <state>NY</state>
   <zip>10532-0000</zip>
  </billingAddress>
  <voice>555-1234</voice>
  <fax>555-4321</fax>
</invoice>
<memo importance='high'
      date='1999-03-23'>
  <from>Paul V. Biron</from>
  <to>Ashok Malhotra</to>
  <subject>Latest draft</subject>
  <body>
    We need to discuss the latest
    draft <emph>immediately</emph>.
    Either email me at <email>
    mailto:[email protected]</email>
    or call <phone>555-9876</phone>
  </body>
</memo>

The invoice contains several dates and telephone numbers, the postal abbreviation for a state (which comes from an enumerated list of sanctioned values), and a ZIP code (which takes a definable regular form). The memo contains many of the same types of information: a date, telephone number, email address and an "importance" value (from an enumerated list, such as "low", "medium" or "high"). Applications which process invoices and memos need to raise exceptions if something that was supposed to be a date or telephone number does not conform to the rules for valid dates or telephone numbers.

In both cases, validity constraints exist on the content of the instances that are not expressible in XML DTDs. The limited datatyping facilities in XML have prevented validating XML processors from supplying the rigorous type checking required in these situations. The result has been that individual applications writers have had to implement type checking in an ad hoc manner. This specification addresses the need of both document authors and applications writers for a robust, extensible datatype system for XML which could be incorporated into XML processors. As discussed below, these datatypes could be used in other XML-related standards as well.

相關推薦

XML Schema Part 2: Datatypes Second Edition

The [XML 1.0 (Second Edition)] specification defines limited facilities for applying datatypes to document content in that documents may contain or ref

Functional MRI (second edition) -- 2. MRI Scanners

———————————————————————————————– M–main static magnetic field R –delivery of energy at the resonance frequency of the targeted a

Lesson 2 Building your first web page: Part 2

examples pear reads port example eth span contain animation Tag Diagram You may have noticed that HTML tags come in pairs; HTML has bot

xmlxml schema命名空間學習

col mes mon efault element body form names ext 首先,xml與xml schema(xsd)文件都是xml格式的文件,都遵循相同的命名空間規則 在schema元素中通過xmlns指定約束文件位置 如下面的xsd文件中的代碼 &l

xml schema復雜類型

return partial mod turn file 生成 cpp click 技術分享 xml schema復雜類型 對於復雜類型,xs:complexType, xs:sequence子節點必須有。 <?xml version="1.0"?>

XML Schema

div min value red xxx default ttr base date 最常用的類型是: xs:string xs:decimal xs:integer xs:boolean xs:date xs:time 1. 文件格式 <x

xml schema 建立xml文檔

ext loser -m cnblogs ice 模擬 ati pin spa web-app_2_5.xsd <?xml version="1.0" encoding="UTF-8"?> <!-- 傳智播客Schema教學實例文檔。

The Xml basic part

his view ember ble fin pri start n) ext Today I reviewed the xml part. Xml‘s full name is Extensible Markup Language which produced from

FZUOJ 2265 Card Game (Second Edition)

程序設計 higher integer nts each exp more 省賽 number 題目鏈接:http://acm.fzu.edu.cn/problem.php?pid=2265 第七屆福建省賽重現賽D題,概率計算不過挺有技巧的,問了acdart兄才恍然大悟(分

如何使用GitLab和Rancher構建CI/CD流水線 – Part 2

docker 鏡像 gitlab 配置 持續集成 部署 這是我們使用GitLab和Rancher構建CI/CD流水線系列教程的第二部分。第一部分的內容介紹了如何部署、配置和確保GitLab在Rancher的運行。這一部分中,我們將介紹如何使用GitLab CI Multi-Runner

JSP復習(part 2

war setattr current ren 客戶端 代碼 body 練習 params 3.4.2 訪問(獲取)請求參數 1.方法 String 字符串變量 =request.getParamete

xml schema數據類型

mine simple 字符串 maxlength value 定時 lap 大於等於 標識 1.簡單數據類型 (1)內置簡單數據類型 schema中定義了一些簡單數據類型,包括primitive原始數據類型和derived派生數據類型,這些類型都是schema中使用的 最

逆向破解H.Koenig 遙控器 Part 2

sda com fec 逆向 title width 優化 數據 http 逆向破解H.Koenig 遙控器 Part 2 到目前為止,我們已經知道了RF收發器的安裝過程,下面是我們所掌握的東西 : l 無線電收發器是一個Avantcom A7105 l 調制是FS

C++ and OO Num. Comp. Sci. Eng. - Part 2.

its ted 增加 數字 gin logs markdown 模板函數 mar 本文參考自《C++ and Object-Oriented Numeric Computing for Scientists and Engineers》。 1. Basic Types 在

UVA10294 Arif in Dhaka (First Love Part 2)

情況 競賽 討論 text part 算法競賽入門經典 轉置 ret nbsp 本文是劉汝佳《算法競賽入門經典——訓練指南》的讀書筆記。 解題思路:   對於項鏈,它只支持旋轉置換;而手鐲支持旋轉和翻轉。下面由這兩種置換來研究本題。   旋轉   設順時針旋轉 \(i\)

【閱讀筆記】《C程序員 從校園到職場》第六章 配置文件,makefile 文件 (Part 2)

不同 tpc 閱讀 ret ftp 理解 源代碼 exe tst Contents: 1.配置文件(通常以 ini 結尾) 2.makefile文件 (Linux) PS: 這篇文章的內容,不太理解。 一、配置文件 本文以一個實際的小軟件為例,介紹了C語言中配

【調試基礎】Part 2 文本字符

ima tel 空格 spa 地址 代碼 nbsp sci -s 01 字節存儲順序 大端:低字節存在高地址,高字節存在低地址。eg:IBM; 小端;低字節存在低地址,高字節存在高地址。eg:INTEL; 02 字符集 ASCII:128=26小寫 + 26大寫 + 10數

Docker 入門(Mac環境)- part 2 容器(container)

username .py containe define 使用 soc _id nec 軟件 part-2 容器(container) 簡介 Docker架構有三個層面,從高到低如下: stack(棧) services(服務) containers(容器) 現在接觸的

持續集成與持續部署寶典Part 2:創建持續集成流水線

假設 文件 如果 運行 刪除 成功 方法 開發模式 system 在本系列文章中,我們將探討在容器時代如何在基於Docker的環境中創建連貫的工作流程和流水線來簡化大規模項目的部署。另外,我們還將詳細介紹如何利用Docker和Rancher自動化處理這些工作流。 在上文《將

Programing in Python3(Second Edition)_實例

.com input exc 實用 ive 就是 bubuko 前言 最大 Programming in Python3 (Second Edition)實例 前言:在學習Python的過程中推薦一本書,《Programming in Python3 》也就是我以前用過的