Effective XML: 50 Specific Ways to Improve Your XML
暫譯: 有效的 XML:50 種具體方法提升你的 XML
Elliotte Rusty Harold
- 出版商: Addison Wesley
- 出版日期: 2003-10-02
- 定價: $1,480
- 售價: 6.0 折 $888
- 語言: 英文
- 頁數: 336
- 裝訂: Paperback
- ISBN: 0321150406
- ISBN-13: 9780321150400
-
相關分類:
XML
立即出貨(限量) (庫存=2)
買這商品的人也買了...
-
$680$537 -
$2,050$1,948 -
$970Introduction to Algorithms, 2/e
-
$2,475$2,351 -
$600$540 -
$1,690$1,606 -
$920$727 -
$1,805Test-Driven Development: By Example (Paperback)
-
$420$328 -
$590$466 -
$490$387 -
$1,400$1,372 -
$690$538 -
$399CCNA ICND Exam Certification Guide (CCNA Self-Study, 640-811, 640-801) (Hardcover)
-
$750$638 -
$560$476 -
$420$332 -
$450$356 -
$480$379 -
$750$593 -
$780$616 -
$590$460 -
$480$99 -
$650$507 -
$620$527
相關主題
商品描述
"This is an excellent collection of XML best practices: essential reading for any developer using XML. This book will help you avoid common pitfalls and ensure your XML applications remain practical and interoperable for as long as possible."—Edd Dumbill, Managing Editor, XML.com and Program Chair, XML Europe
"A collection of useful advice about XML and related technologies. Well worth reading before, during, and after XML application development."—Sean McGrath, CTO, Propylon
If you want to become a more effective XML developer, you need this book. You will learn which tools to use when in order to write legible, extensible, maintainable and robust XML code.
- Page 36: How do you write DTDs that are independent of namespace prefixes?
- Page 82: What do parsers reliably report and what don't they?
- Page 130: Which schema language is the right one for your job?
- Page 178: Which API should you choose for maximum speed and minimum size?
- Page 257: What can you do to ensure fast, reliable access to DTDs and schemas without making your document less portable?
- Page 283: Is XML too verbose for your application?
Elliotte Rusty Harold provides you with 50 practical rules of thumb based on real-world examples and best practices. His engaging writing style is easy to understand and illustrates how you can save development time while improving your XML code. Learn to write XML that is easy to edit, simple to process, and is fully interoperable with other applications and code. Understand how to design and document XML vocabularies so they are both descriptive and extensible. After reading this book, you'll be ready to choose the best tools and APIs for both large-scale and small-scale processing jobs. Elliotte provides you with essential information on building services such as verification, compression, authentication, caching, and content management.
If you want to design, deploy, or build better systems that utilize XML—then buy this book and get going!
Table of Contents
Preface.
Acknowledgments.
Introduction.
Element versus Tag.
Attribute versus Attribute Value.
Entity versus Entity Reference.
Entity Reference versus Character Reference.
Children versus Child Elements versus Content.
Text versus Character Data versus Markup.
Namespace versus Namespace Name versus Namespace URI.
XML Document versus XML File.
XML Application versus XML Software.
Well-Formed versus Valid.
DTD versus DOCTYPE.
XML Declaration versus Processing Instruction.
Character Set versus Character Encoding.
URI versus URI Reference versus IRI.
Schemas versus the W3C XML Schema Language.I. SYNTAX.
Item 1. Include an XML Declaration.
The version Info.
The encoding Declaration.
The standalone Declaration.Item 2. Mark Up with ASCII if Possible.
Item 3. Stay with XML 1.0.
New Characters in XML Names.
C0 Control Characters.
C1 Control Characters.
NEL Used as a Line Break.
Unicode Normalization.
Undeclaring Namespace Prefixes.Item 4. Use Standard Entity References.
Item 5. Comment DTDs Liberally.
The Header Comment.
Declarations.Item 6. Name Elements with Camel Case.
Item 7. Parameterize DTDs.
Parameterizing Attributes.
Parameterizing Namespaces.
Full Parameterization.
Conditional Sections.Item 8. Modularize DTDs.
Item 9. Distinguish Text from Markup.
Item 10. White Space Matters.
The xml:space Attribute.
Ignorable White Space.
Tags and White Space.
White Space in Attributes.
Schemas.II. STRUCTURE.
Item 11. Make Structure Explicit through Markup.
Tag Each Unit of Information.
Avoid Implicit Structure.
Where to Stop?Item 12. Store Metadata in Attributes.
Item 13. Remember Mixed Content.
Item 14. Allow All XML Syntax.
Item 15. Build on Top of Structures, Not Syntax.
Empty-Element Tags.
CDATA Sections.
Character and Entity References.Item 16. Prefer URLs to Unparsed Entities and Notations.
Item 17. Use Processing Instructions for Process-Specific Content.
Style Location.
Overlapping Markup.
Page Formatting.
Out-of-Line Markup.
Misuse of Processing Instructions.Item 18. Include All Information in the Instance Document.
Item 19. Encode Binary Data Using Quoted Printable and/or Base64.
Quoted Printable.
Base64.Item 20. Use Namespaces for Modularity and Extensibility.
Choosing a Namespace URI.
Validation and Namespaces.Item 21. Rely on Namespace URIs, Not Prefixes.
Item 22. Don't Use Namespace Prefixes in Element Content and Attribute Values.
Item 23. Reuse XHTML for Generic Narrative Content.
Item 24. Choose the Right Schema Language for the Job.
The W3C XML Schema Language.
Document Type Definitions.
RELAX NG.
Schematron.
Java, C#, Python, and Perl.
Layering Schemas.Item 25. Pretend There's No Such Thing as the PSVI.
Item 26. Version Documents, Schemas, and Stylesheets.
Item 27. Mark Up According to Meaning.
III. SEMANTICS.
Item 28. Use Only What You Need.
Item 29. Always Use a Parser.
Item 30. Layer Functionality.
Item 31. Program to Standard APIs.
SAX.
DOM.
JDOM.Item 32. Choose SAX for Computer Efficiency.
Item 33. Choose DOM for Standards Support.
Item 34. Read the Complete DTD.
Item 35. Navigate with XPath.
Item 36. Serialize XML with XML.
Item 37. Validate Inside Your Program with Schemas.
Xerces-J.
DOM Level 3 Validation.IV. IMPLEMENTATION.
Item 38. Write in Unicode.
Choosing an Encoding.
A char Is Not a Character.
Normalization Forms.
Sorting.Item 39. Parameterize XSLT Stylesheets.
Item 40. Avoid Vendor Lock-In.
Item 41. Hang On to Your Relational Database.
Item 42. Document Namespaces with RDDL.
Natures.
Purposes.Item 43. Preprocess XSLT on the Server Side.
商品描述(中文翻譯)
摘要
「這是一本優秀的 XML 最佳實踐集:對於任何使用 XML 的開發者來說,這是必讀之作。這本書將幫助你避免常見的陷阱,並確保你的 XML 應用程序在可能的情況下保持實用和互操作性。」—Edd Dumbill,XML.com 總編輯及 XML Europe 程序主席
「關於 XML 和相關技術的有用建議集。在 XML 應用開發之前、期間和之後閱讀都非常值得。」—Sean McGrath,Propylon 首席技術官
如果你想成為一名更有效的 XML 開發者,你需要這本書。你將學會在何時使用哪些工具,以便編寫可讀性高、可擴展、可維護且穩健的 XML 代碼。
- 第 36 頁:如何編寫與命名空間前綴無關的 DTD?
- 第 82 頁:解析器可靠地報告什麼,什麼不報告?
- 第 130 頁:哪種架構語言適合你的工作?
- 第 178 頁:你應該選擇哪個 API 以獲得最大速度和最小大小?
- 第 257 頁:你可以做什麼來確保快速、可靠地訪問 DTD 和架構,而不使你的文檔變得不便攜?
- 第 283 頁:XML 對於你的應用程序來說是否過於冗長?
Elliotte Rusty Harold 提供了 50 條基於現實世界範例和最佳實踐的實用規則。他引人入勝的寫作風格易於理解,並說明了如何在改善你的 XML 代碼的同時節省開發時間。學會編寫易於編輯、簡單處理且與其他應用程序和代碼完全互操作的 XML。了解如何設計和記錄 XML 詞彙,使其既具描述性又可擴展。閱讀完這本書後,你將準備好為大規模和小規模處理工作選擇最佳工具和 API。Elliotte 提供了有關構建服務的基本信息,例如驗證、壓縮、身份驗證、緩存和內容管理。
如果你想設計、部署或構建更好的利用 XML 的系統——那麼就買下這本書,開始行動吧!
目錄
前言。
致謝。
介紹。
元素與標籤。
屬性與屬性值。
實體與實體引用。
實體引用與字符引用。
子元素與內容。
文本與字符數據與標記。
命名空間與命名空間名稱與命名空間 URI。
XML 文檔與 XML 文件。
XML 應用程序與 XML 軟件。
良構與有效。
DTD 與 DOCTYPE。
XML 聲明與處理指令。
字符集與字符編碼。
URI 與 URI 引用與 IRI。
架構與 W3C XML 架構語言。
I. 語法。
項目 1. 包含 XML 聲明。
版本信息。
編碼聲明。
獨立聲明。
項目 2. 如果可能,使用 ASCII 標記。
項目 3. 保持使用 XML 1.0。
XML 名稱中的新字符。
C0 控制字符。
C1 控制字符。
NEL 用作換行符。
Unicode 正規化。
取消聲明命名空間前綴。
項目 4. 使用標準實體引用。
項目 5. 大方地註釋 DTD。
標頭註釋。
聲明。
項目 6. 使用駝峰式命名元素。
項目 7. 參數化 DTD。
參數化屬性。
參數化命名空間。
完全參數化。
條件區段。
項目 8. 模組化 DTD。
項目 9. 區分文本與標記。
項目 10. 空白字符很重要。
xml:space 屬性。
可忽略的空白字符。
標籤與空白字符。
屬性中的空白字符。
架構。
II. 結構。
項目 11. 通過標記使結構明確。
標記每個信息單元。
避免隱式結構。
何時停止?
項目 12. 將元數據存儲在屬性中。
項目 13. 記住混合內容。
項目 14. 允許所有 XML 語法。
項目 15. 在結構上構建,而不是語法上。
空元素標籤。
CDATA 區段。
字符和實體引用。
項目 16. 優先使用 URL 而非未解析的實體和註釋。
項目 17. 對於特定內容使用處理指令。
樣式位置。
重疊標記。
頁面格式。
行外標記。
處理指令的誤用。
項目 18. 在實例文檔中包含所有信息。
項目 19. 使用 Quoted Printable 和/或 Base64 編碼二進制數據。
Quoted Printable。
Base64。
項目 20. 使用命名空間以實現模組化和可擴展性。
選擇命名空間 URI。
驗證與命名空間。
項目 21. 依賴命名空間 URI,而非前綴。
項目 22. 不要在元素內容和屬性值中使用命名空間前綴。
項目 23. 重用 XHTML 以處理通用敘述內容。
項目 24. 為工作選擇正確的架構語言。
W3C XML 架構語言。
文檔類型定義。
RELAX NG。
Schematron。
Java、C#、Python 和 Perl。
分層架構。
項目 25. 假裝不存在 PSVI。
項目 26. 版本文檔、架構和樣式表。
項目 27. 根據意義進行標記。
III. 語義。
項目 28. 只使用你需要的。
項目 29. 始終使用解析器。
項目 30. 層次功能。
項目 31. 程式設計標準 API。
SAX。
DOM。
JDOM。
項目 32. 為計算效率選擇 SAX。
項目 33. 為標準支持選擇 DOM。
項目 34. 閱讀完整的 DTD。
項目 35. 使用 XPath 導航。
項目 36. 使用 XML 序列化 XML。
項目 37. 使用架構在你的程序內進行驗證。
Xerces-J。
DOM Level 3 驗證。
IV. 實現。
項目 38. 使用 Unicode 編寫。
選擇編碼。