Presentation is loading. Please wait.

Presentation is loading. Please wait.

CSU - DCE 0706 - Introduction to XML XML Core Concepts - Fort Collins, CO Copyright © XTR Systems, LLC XML Core Concepts or Some Gory Details Instructor:

Similar presentations


Presentation on theme: "CSU - DCE 0706 - Introduction to XML XML Core Concepts - Fort Collins, CO Copyright © XTR Systems, LLC XML Core Concepts or Some Gory Details Instructor:"— Presentation transcript:

1 CSU - DCE 0706 - Introduction to XML XML Core Concepts - Fort Collins, CO Copyright © XTR Systems, LLC XML Core Concepts or Some Gory Details Instructor: Joseph DiVerdi, Ph.D., M.B.A.

2 CSU - DCE 0706 - Introduction to XML XML Core Concepts - Fort Collins, CO Copyright © XTR Systems, LLC Ground Rules XML Rules Differ From HTML Rules –Generally More Stringent Case is Significant Attributes Must be Contained in Quotes Whitespace is Not Collapsed Automatically Containers Must Always Be Closed

3 CSU - DCE 0706 - Introduction to XML XML Core Concepts - Fort Collins, CO Copyright © XTR Systems, LLC Outline Anatomy of an XML-Compliant Document –Prolog –Elements Elements –Attributes Namespace Entities –Character –Mixed-Content Well-Formedness & Validity

4 CSU - DCE 0706 - Introduction to XML XML Core Concepts - Fort Collins, CO Copyright © XTR Systems, LLC Document Anatomy XML-Compliant Document –A Reservoir of Information –Structured Data Two Separate Components –Prolog Provides Declarations to XML Software Applications –Elements Contains Marked-Up Data

5 CSU - DCE 0706 - Introduction to XML XML Core Concepts - Fort Collins, CO Copyright © XTR Systems, LLC Document Prolog Contents –XML Declaration - required –Document Type Declaration - optional Not Document Type Definition Simplest XML Prolog –Only Contains XML Declaration –Note Unique Delimiters

6 CSU - DCE 0706 - Introduction to XML XML Core Concepts - Fort Collins, CO Copyright © XTR Systems, LLC XML Declaration Several Properties Available –Version version = "1.0" Identifies Rules of Engagement Only v1.0 Currently in Existence –Encoding encoding = "iso-8859-1" Identifies Character Set Used in Document –Standalone standalone = "yes" Indicates Whether or Not Other Files Are Involved

7 CSU - DCE 0706 - Introduction to XML XML Core Concepts - Fort Collins, CO Copyright © XTR Systems, LLC XML Declaration Examples –Property Order is Not Important –Parameter Names are lower case –Values are Quoted –Properties are Space-Delimited

8 CSU - DCE 0706 - Introduction to XML XML Core Concepts - Fort Collins, CO Copyright © XTR Systems, LLC Character Sets A Brief Digression...

9 CSU - DCE 0706 - Introduction to XML XML Core Concepts - Fort Collins, CO Copyright © XTR Systems, LLC Character Sets Character –A Unit of a Written Language System ay, bee, see, dee, eff, gee, aych, eye Glyph –An Actual Printed or Displayed Character = a b c 5, $ ó

10 CSU - DCE 0706 - Introduction to XML XML Core Concepts - Fort Collins, CO Copyright © XTR Systems, LLC Character Sets A Character May Associate With Several Glyphs –Close Quote - " or » A Glyph May Correspond to Several Characters –Comma - pause in sentence or decimal indicator In Certain Languages

11 CSU - DCE 0706 - Introduction to XML XML Core Concepts - Fort Collins, CO Copyright © XTR Systems, LLC Character Sets Each Character is Assigned –A Specific Numeric Value Number of Characters in a Character Set –Limited by the Bit-Depth of its Encoding 8-Bit Encoded Character Set - 256 characters 16-Bit Encoded Character Set - 65,536 characters HTML v2.0 & v3.2 are based on ISO 8859-1 –8-Bit Character Set AKA Latin-1

12 CSU - DCE 0706 - Introduction to XML XML Core Concepts - Fort Collins, CO Copyright © XTR Systems, LLC Character Sets ISO-8859-1 Character Set –8-Bit Depth First 128 Values From US-ASCII Numeric ValueGlyphDescription 13CRcarriage return 480digit zero 64Auppercase aye 94^caret 177±plus-or-minus 191¿inverted question mark 255ÿlowercase wye w/umlaut

13 CSU - DCE 0706 - Introduction to XML XML Core Concepts - Fort Collins, CO Copyright © XTR Systems, LLC Character Sets (continued) Common 8-bit character sets ISO 8859-1Latin-1 ISO 8859-5Cyrillic ISO 8859-6Arabic ISO 8859-7Greek ISO 8859-8Hebrew SHIFT_JISJapanese EUC_JPJapanese

14 CSU - DCE 0706 - Introduction to XML XML Core Concepts - Fort Collins, CO Copyright © XTR Systems, LLC Uses of Character Sets LanguagesCountriesCharacter Sets Frenchfr iso-8859-1 Greekeliso-8859-7 Hebrewiwiso-8859-8 Hungarianhuiso-8859-2 Icelandicisiso-8859-1 Italianitiso-8859-1 Japanesejashift_jis, iso-2022-jp, euc-jp Romanianroiso-8859-2 Russianrukoi-8-r, iso-8859-5 Serbiansriso-8859-5 Slovakskiso-8859-2 Spanishesiso-8859-1 Turkishtriso-8859-9 Ukrainianukiso-8859-5

15 CSU - DCE 0706 - Introduction to XML XML Core Concepts - Fort Collins, CO Copyright © XTR Systems, LLC Character Sets (continued) 256 Characters are Sufficient –For Certain Languages Insufficient for Others –Japanese (kanji) –Chinese –Korean –Vietnamese Hence the Need For –16-Bit Encoded Character Sets

16 CSU - DCE 0706 - Introduction to XML XML Core Concepts - Fort Collins, CO Copyright © XTR Systems, LLC Character Sets 16-Bit Encoded Character Sets –Two Contiguous Bytes Represent One Character 65,536 Possible Characters in One Set –Unicode is a 16-bit Character Set Developed by the Unicode Consortium –Practically Identical to ISO 10646-1 First 256 Slots Allocated to ISO 8859-1 –Backwards Compatible (woo-hoo!)

17 CSU - DCE 0706 - Introduction to XML XML Core Concepts - Fort Collins, CO Copyright © XTR Systems, LLC Character Sets A Brief Digression... Bottom Line –Specify Your Encoding As Required –Important For International Applications Multi-Lingual Applications There, now you know about it.

18 CSU - DCE 0706 - Introduction to XML XML Core Concepts - Fort Collins, CO Copyright © XTR Systems, LLC XML Declaration Examples –Property Order is Not Important –Parameter Names are lower case –Values are Quoted –Properties are Space-Delimited

19 CSU - DCE 0706 - Introduction to XML XML Core Concepts - Fort Collins, CO Copyright © XTR Systems, LLC Document Type Declaration Describes Root Element –Top-Level Document Container Designates DTD –Document Type Definition –For Precisely Defining Document Structure Names DTD Using Public Identifier Locates DTD Using System Identifier –Defined Internal Subset of DTD

20 CSU - DCE 0706 - Introduction to XML XML Core Concepts - Fort Collins, CO Copyright © XTR Systems, LLC Example of External DTD <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" SYSTEM "http://www.w3.org/TR/2000/REC-xhtml1- 20000126/DTD/xhtml1-strict.dtd"> Note Root Element Name Note Public Identifier –Names DTD Using Public Name See comments on p51 of text Note System URI –Tells Software Application Where to Find It

21 CSU - DCE 0706 - Introduction to XML XML Core Concepts - Fort Collins, CO Copyright © XTR Systems, LLC Example of Internal DTD <!DOCTYPE PARENT [ <!ATTLIST IDENTIFIER NUMBER ID #REQUIRED TYPE (natural|adopted|testube) "natural"> ]>

22 CSU - DCE 0706 - Introduction to XML XML Core Concepts - Fort Collins, CO Copyright © XTR Systems, LLC Example of Ext & Int DTD <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" SYSTEM "http://www.w3.org/TR/2000/REC-xhtml1- 20000126/DTD/xhtml1-strict.dtd"> [ XML > <!ENTITY CREDO " Resistance is Futile "> ]>


Download ppt "CSU - DCE 0706 - Introduction to XML XML Core Concepts - Fort Collins, CO Copyright © XTR Systems, LLC XML Core Concepts or Some Gory Details Instructor:"

Similar presentations


Ads by Google