Copyright © 2002 ProsoftTraining. All rights reserved. XML Document Design.
-
Upload
nigel-turner -
Category
Documents
-
view
220 -
download
0
Transcript of Copyright © 2002 ProsoftTraining. All rights reserved. XML Document Design.
![Page 1: Copyright © 2002 ProsoftTraining. All rights reserved. XML Document Design.](https://reader038.fdocuments.net/reader038/viewer/2022110400/56649da95503460f94a9685e/html5/thumbnails/1.jpg)
Copyright © 2002 ProsoftTraining. All rights reserved.
XML Document Design
![Page 2: Copyright © 2002 ProsoftTraining. All rights reserved. XML Document Design.](https://reader038.fdocuments.net/reader038/viewer/2022110400/56649da95503460f94a9685e/html5/thumbnails/2.jpg)
Copyright © 2002 ProsoftTraining. All rights reserved.
Lesson 1:Introduction to XML
![Page 3: Copyright © 2002 ProsoftTraining. All rights reserved. XML Document Design.](https://reader038.fdocuments.net/reader038/viewer/2022110400/56649da95503460f94a9685e/html5/thumbnails/3.jpg)
Objectives
• Explain the basic concepts of markup languages
• List the goals of XML• Describe the relationship between XML and
HTML• Name the organizations that govern and
contribute to XML development• Define XHTML• Identify browsers that support XML
![Page 4: Copyright © 2002 ProsoftTraining. All rights reserved. XML Document Design.](https://reader038.fdocuments.net/reader038/viewer/2022110400/56649da95503460f94a9685e/html5/thumbnails/4.jpg)
WhatIs XML?
• Extensible Markup Language• Hypertext Markup Language• Tags <golfer tour=“PGA”> Tiger Woods </golfer>
![Page 5: Copyright © 2002 ProsoftTraining. All rights reserved. XML Document Design.](https://reader038.fdocuments.net/reader038/viewer/2022110400/56649da95503460f94a9685e/html5/thumbnails/5.jpg)
MarkupLanguages
• Markup• WYSIWYG
![Page 6: Copyright © 2002 ProsoftTraining. All rights reserved. XML Document Design.](https://reader038.fdocuments.net/reader038/viewer/2022110400/56649da95503460f94a9685e/html5/thumbnails/6.jpg)
SGMLRoots
• STML and HTML– Meta-language
• HTML went astray• HTML tried to recover its vision
– Cascading Style Sheets• SGML and XML
– Extensible Stylesheet Language
![Page 7: Copyright © 2002 ProsoftTraining. All rights reserved. XML Document Design.](https://reader038.fdocuments.net/reader038/viewer/2022110400/56649da95503460f94a9685e/html5/thumbnails/7.jpg)
XMLDirectives
• Design goals for XML• XML implementation
![Page 8: Copyright © 2002 ProsoftTraining. All rights reserved. XML Document Design.](https://reader038.fdocuments.net/reader038/viewer/2022110400/56649da95503460f94a9685e/html5/thumbnails/8.jpg)
XHTML,XML and HTML
• Extensible Hypertext Markup Language 1.0– No tags
![Page 9: Copyright © 2002 ProsoftTraining. All rights reserved. XML Document Design.](https://reader038.fdocuments.net/reader038/viewer/2022110400/56649da95503460f94a9685e/html5/thumbnails/9.jpg)
XMLDevelopment Organizations
• W3C• Oasis• BizTalk• XML.org
• Arbortext• Microsoft XML Web
Services• IBM XML Zone• Apache XML Project
![Page 10: Copyright © 2002 ProsoftTraining. All rights reserved. XML Document Design.](https://reader038.fdocuments.net/reader038/viewer/2022110400/56649da95503460f94a9685e/html5/thumbnails/10.jpg)
XML Parsersand Browsers
• Parsers– Validating– Non-validating
• Browsers– Mozilla– Microsoft Internet Explorer 6– Opera– Netscape Navigator 7
![Page 11: Copyright © 2002 ProsoftTraining. All rights reserved. XML Document Design.](https://reader038.fdocuments.net/reader038/viewer/2022110400/56649da95503460f94a9685e/html5/thumbnails/11.jpg)
XML AloneIs Insufficient
• No linking capability• No formatting capabilities• XML documents are abstract
– EDI
![Page 12: Copyright © 2002 ProsoftTraining. All rights reserved. XML Document Design.](https://reader038.fdocuments.net/reader038/viewer/2022110400/56649da95503460f94a9685e/html5/thumbnails/12.jpg)
Implementing XML
• XML schema• Development tools
![Page 13: Copyright © 2002 ProsoftTraining. All rights reserved. XML Document Design.](https://reader038.fdocuments.net/reader038/viewer/2022110400/56649da95503460f94a9685e/html5/thumbnails/13.jpg)
Benefitsof XML
• One source• Management of metadata• Universal representation and meaning• Management of content• One to many• Database publishing
![Page 14: Copyright © 2002 ProsoftTraining. All rights reserved. XML Document Design.](https://reader038.fdocuments.net/reader038/viewer/2022110400/56649da95503460f94a9685e/html5/thumbnails/14.jpg)
Summary
Explain the basic concepts of markup languages
List the goals of XML Describe the relationship between XML and
HTML Name the organizations that govern and
contribute to XML development Define XHTML Identify browsers that support XML
![Page 15: Copyright © 2002 ProsoftTraining. All rights reserved. XML Document Design.](https://reader038.fdocuments.net/reader038/viewer/2022110400/56649da95503460f94a9685e/html5/thumbnails/15.jpg)
Copyright © 2002 ProsoftTraining. All rights reserved.
Lesson 2:Well-Formed
XML Documents
![Page 16: Copyright © 2002 ProsoftTraining. All rights reserved. XML Document Design.](https://reader038.fdocuments.net/reader038/viewer/2022110400/56649da95503460f94a9685e/html5/thumbnails/16.jpg)
Objectives
• Construct XML documents• Explain the differences between tags and
elements in XML• Specify the five rules for creating a well-
formed XML document• Convert an HTML document into an XHTML
file• Create a well-formed XML document
![Page 17: Copyright © 2002 ProsoftTraining. All rights reserved. XML Document Design.](https://reader038.fdocuments.net/reader038/viewer/2022110400/56649da95503460f94a9685e/html5/thumbnails/17.jpg)
What Is an XML Document?
• HTML: The lazy developer’s dream• XML: The lazy developer’s nightmare
![Page 18: Copyright © 2002 ProsoftTraining. All rights reserved. XML Document Design.](https://reader038.fdocuments.net/reader038/viewer/2022110400/56649da95503460f94a9685e/html5/thumbnails/18.jpg)
Tags andElements in XML
![Page 19: Copyright © 2002 ProsoftTraining. All rights reserved. XML Document Design.](https://reader038.fdocuments.net/reader038/viewer/2022110400/56649da95503460f94a9685e/html5/thumbnails/19.jpg)
Rules forWell-Formed XML
• Opening and closing tags• New rules for empty tags• Attribute values• Nesting• Matching case between tags• Simple well-formed XML• XHTML: Stepping stone to XML
![Page 20: Copyright © 2002 ProsoftTraining. All rights reserved. XML Document Design.](https://reader038.fdocuments.net/reader038/viewer/2022110400/56649da95503460f94a9685e/html5/thumbnails/20.jpg)
TagNesting
![Page 21: Copyright © 2002 ProsoftTraining. All rights reserved. XML Document Design.](https://reader038.fdocuments.net/reader038/viewer/2022110400/56649da95503460f94a9685e/html5/thumbnails/21.jpg)
DiscerningStructure
• XML character strings– Character data
• White space• The root (or document) element• Tree structure of a well-formed document
![Page 22: Copyright © 2002 ProsoftTraining. All rights reserved. XML Document Design.](https://reader038.fdocuments.net/reader038/viewer/2022110400/56649da95503460f94a9685e/html5/thumbnails/22.jpg)
TreeStructure
T IT LE
AUT HOR
YEAR-PUBLISHED
ISBN
BOOK
CATALOG
![Page 23: Copyright © 2002 ProsoftTraining. All rights reserved. XML Document Design.](https://reader038.fdocuments.net/reader038/viewer/2022110400/56649da95503460f94a9685e/html5/thumbnails/23.jpg)
Working withMixed Content
• Creating a well-formed XML document from text
• Adding comments to XML documents• XML encoding
![Page 24: Copyright © 2002 ProsoftTraining. All rights reserved. XML Document Design.](https://reader038.fdocuments.net/reader038/viewer/2022110400/56649da95503460f94a9685e/html5/thumbnails/24.jpg)
Balkanizationof the Web
• Confusing assortment of tags resulting from numerous tagging schemes
![Page 25: Copyright © 2002 ProsoftTraining. All rights reserved. XML Document Design.](https://reader038.fdocuments.net/reader038/viewer/2022110400/56649da95503460f94a9685e/html5/thumbnails/25.jpg)
Summary
Construct XML documents Explain the differences between tags and
elements in XML Specify the five rules for creating a well-
formed XML document Convert an HTML document into an XHTML
file Create a well-formed XML document
![Page 26: Copyright © 2002 ProsoftTraining. All rights reserved. XML Document Design.](https://reader038.fdocuments.net/reader038/viewer/2022110400/56649da95503460f94a9685e/html5/thumbnails/26.jpg)
Copyright © 2002 ProsoftTraining. All rights reserved.
Lesson 3:Creating a
Valid XML Document
![Page 27: Copyright © 2002 ProsoftTraining. All rights reserved. XML Document Design.](https://reader038.fdocuments.net/reader038/viewer/2022110400/56649da95503460f94a9685e/html5/thumbnails/27.jpg)
Objectives
• Define the DTD• Define the DOM• Identify DTD declarations• Create a DTD• Validate an XML document• Create an XML file that conforms to a DTD• Use DTD repositories
![Page 28: Copyright © 2002 ProsoftTraining. All rights reserved. XML Document Design.](https://reader038.fdocuments.net/reader038/viewer/2022110400/56649da95503460f94a9685e/html5/thumbnails/28.jpg)
Beyond Well-Formedness:Valid XML Documents
• Valid conformance with a Document Type Definition– Rules that define the structure, syntax and
vocabulary related to tags
![Page 29: Copyright © 2002 ProsoftTraining. All rights reserved. XML Document Design.](https://reader038.fdocuments.net/reader038/viewer/2022110400/56649da95503460f94a9685e/html5/thumbnails/29.jpg)
DocumentObject Model
• Core Level 1• HTML Level 1
![Page 30: Copyright © 2002 ProsoftTraining. All rights reserved. XML Document Design.](https://reader038.fdocuments.net/reader038/viewer/2022110400/56649da95503460f94a9685e/html5/thumbnails/30.jpg)
DocumentType Definition
• The root element• Element type declarations
– #PCDATA– Child elements– Element content– Mixed content– Empty elements
![Page 31: Copyright © 2002 ProsoftTraining. All rights reserved. XML Document Design.](https://reader038.fdocuments.net/reader038/viewer/2022110400/56649da95503460f94a9685e/html5/thumbnails/31.jpg)
Referencing DTDDefinitions in XML
• DOCTYPE declaration• Internal DTD• External DTD
![Page 32: Copyright © 2002 ProsoftTraining. All rights reserved. XML Document Design.](https://reader038.fdocuments.net/reader038/viewer/2022110400/56649da95503460f94a9685e/html5/thumbnails/32.jpg)
DeclaringAttributes in a DTD
• Attribute-list declarations• Commonly used attribute types• Entities• Parameter entities• Notation declarations
![Page 33: Copyright © 2002 ProsoftTraining. All rights reserved. XML Document Design.](https://reader038.fdocuments.net/reader038/viewer/2022110400/56649da95503460f94a9685e/html5/thumbnails/33.jpg)
Pre-Existing DTDs
• XML/DTD repositories
![Page 34: Copyright © 2002 ProsoftTraining. All rights reserved. XML Document Design.](https://reader038.fdocuments.net/reader038/viewer/2022110400/56649da95503460f94a9685e/html5/thumbnails/34.jpg)
Summary
Define the DTD Define the DOM Identify DTD declarations Create a DTD Validate an XML document Create an XML file that conforms to a DTD Use DTD repositories
![Page 35: Copyright © 2002 ProsoftTraining. All rights reserved. XML Document Design.](https://reader038.fdocuments.net/reader038/viewer/2022110400/56649da95503460f94a9685e/html5/thumbnails/35.jpg)
Copyright © 2002 ProsoftTraining. All rights reserved.
Lesson 4:XML Parsers
![Page 36: Copyright © 2002 ProsoftTraining. All rights reserved. XML Document Design.](https://reader038.fdocuments.net/reader038/viewer/2022110400/56649da95503460f94a9685e/html5/thumbnails/36.jpg)
Objectives
• Explain the requirements for a parser• Identify the differences between validating and
non-validating parsers• Use online parsers• Use command-line parsers
![Page 37: Copyright © 2002 ProsoftTraining. All rights reserved. XML Document Design.](https://reader038.fdocuments.net/reader038/viewer/2022110400/56649da95503460f94a9685e/html5/thumbnails/37.jpg)
Parsers
• Also known as processors• Varying levels of conformance• Object-based parsers• Event-based parsers• Validating parsers• Non-validating parsers
![Page 38: Copyright © 2002 ProsoftTraining. All rights reserved. XML Document Design.](https://reader038.fdocuments.net/reader038/viewer/2022110400/56649da95503460f94a9685e/html5/thumbnails/38.jpg)
Command-LineParsing
• Verifies document compliance with well-formedness requirements and DTD
![Page 39: Copyright © 2002 ProsoftTraining. All rights reserved. XML Document Design.](https://reader038.fdocuments.net/reader038/viewer/2022110400/56649da95503460f94a9685e/html5/thumbnails/39.jpg)
Summary
Explain the requirements for a parser Identify the differences between validating and
non-validating parsers Use online parsers Use command-line parsers
![Page 40: Copyright © 2002 ProsoftTraining. All rights reserved. XML Document Design.](https://reader038.fdocuments.net/reader038/viewer/2022110400/56649da95503460f94a9685e/html5/thumbnails/40.jpg)
Copyright © 2002 ProsoftTraining. All rights reserved.
Lesson 5:The XML Familyof Technologies
![Page 41: Copyright © 2002 ProsoftTraining. All rights reserved. XML Document Design.](https://reader038.fdocuments.net/reader038/viewer/2022110400/56649da95503460f94a9685e/html5/thumbnails/41.jpg)
Objectives
• Define XML namespaces and usage• Explain the XPath recommendation• Explain the XLink recommendation• Explain the XPointer recommendation• Describe the XForms and XML Query
proposals
![Page 42: Copyright © 2002 ProsoftTraining. All rights reserved. XML Document Design.](https://reader038.fdocuments.net/reader038/viewer/2022110400/56649da95503460f94a9685e/html5/thumbnails/42.jpg)
TheXML Family
• Namespaces in XML• XLink• XPath• XPointer
![Page 43: Copyright © 2002 ProsoftTraining. All rights reserved. XML Document Design.](https://reader038.fdocuments.net/reader038/viewer/2022110400/56649da95503460f94a9685e/html5/thumbnails/43.jpg)
Namespacesin XML
• Namespace components• Explicit and implicit namespace declaration• Multiple namespaces• Inline namespace declaration• Namespace scope/inheritance• Namespaces and DTDs• Namespace attributes
![Page 44: Copyright © 2002 ProsoftTraining. All rights reserved. XML Document Design.](https://reader038.fdocuments.net/reader038/viewer/2022110400/56649da95503460f94a9685e/html5/thumbnails/44.jpg)
XPath
• XML Path Language• XPath nodes
– Document– Root– Element– Attribute– Text– Processing instruction– Namespace– Comment
![Page 45: Copyright © 2002 ProsoftTraining. All rights reserved. XML Document Design.](https://reader038.fdocuments.net/reader038/viewer/2022110400/56649da95503460f94a9685e/html5/thumbnails/45.jpg)
XPathExpressions
• Operand• Location paths
– Context node• Function calls
– Predicate
![Page 46: Copyright © 2002 ProsoftTraining. All rights reserved. XML Document Design.](https://reader038.fdocuments.net/reader038/viewer/2022110400/56649da95503460f94a9685e/html5/thumbnails/46.jpg)
XLink
• XML Linking Language– Simple links– Extended links– Locators– Arcs– Resources– Titles
• Link behavior
![Page 47: Copyright © 2002 ProsoftTraining. All rights reserved. XML Document Design.](https://reader038.fdocuments.net/reader038/viewer/2022110400/56649da95503460f94a9685e/html5/thumbnails/47.jpg)
XPointer
• Fragment identifier• Tracing a path• Shorthand notation• Shorthand syntax• Formal XPointer syntax• Range or portion selection
![Page 48: Copyright © 2002 ProsoftTraining. All rights reserved. XML Document Design.](https://reader038.fdocuments.net/reader038/viewer/2022110400/56649da95503460f94a9685e/html5/thumbnails/48.jpg)
XFormsand XML Query
• XForms– New generation of forms introducing
business logic, calculations, and form processing
• XML Query– Based pm XML Infoset
![Page 49: Copyright © 2002 ProsoftTraining. All rights reserved. XML Document Design.](https://reader038.fdocuments.net/reader038/viewer/2022110400/56649da95503460f94a9685e/html5/thumbnails/49.jpg)
Summary
Define XML namespaces and usage Explain the XPath recommendation Explain the XLink recommendation Explain the XPointer recommendation Describe the XForms and XML Query
proposals
![Page 50: Copyright © 2002 ProsoftTraining. All rights reserved. XML Document Design.](https://reader038.fdocuments.net/reader038/viewer/2022110400/56649da95503460f94a9685e/html5/thumbnails/50.jpg)
Copyright © 2002 ProsoftTraining. All rights reserved.
Lesson 6:XSL Transformation
![Page 51: Copyright © 2002 ProsoftTraining. All rights reserved. XML Document Design.](https://reader038.fdocuments.net/reader038/viewer/2022110400/56649da95503460f94a9685e/html5/thumbnails/51.jpg)
Objectives
• Describe the relationship between XSL and XSLT
• Use XSLT templates and patterns• Convert XML to a new XML output document• Reorganize XML data to an output file• Convert XML to HTML• Compile remote data sources into an XML
output file
![Page 52: Copyright © 2002 ProsoftTraining. All rights reserved. XML Document Design.](https://reader038.fdocuments.net/reader038/viewer/2022110400/56649da95503460f94a9685e/html5/thumbnails/52.jpg)
XSL, XSLTand Style Sheets
• Extensible Stylesheet Language Transformation
• Formatting objects (flow objects)• Transformation languages• XSLT processing• XSLT namespace
![Page 53: Copyright © 2002 ProsoftTraining. All rights reserved. XML Document Design.](https://reader038.fdocuments.net/reader038/viewer/2022110400/56649da95503460f94a9685e/html5/thumbnails/53.jpg)
XSLTDocument Structure
• Style sheet element and namespace• Templates• apply-templates• select
![Page 54: Copyright © 2002 ProsoftTraining. All rights reserved. XML Document Design.](https://reader038.fdocuments.net/reader038/viewer/2022110400/56649da95503460f94a9685e/html5/thumbnails/54.jpg)
TransformingData: XML to XML
• Scenario• Models• Solution• Element transformation
![Page 55: Copyright © 2002 ProsoftTraining. All rights reserved. XML Document Design.](https://reader038.fdocuments.net/reader038/viewer/2022110400/56649da95503460f94a9685e/html5/thumbnails/55.jpg)
SaxonXSLT Processor
• Running Saxon• Processing XSLT using Saxon• Converting XML data structure using XSLT
![Page 56: Copyright © 2002 ProsoftTraining. All rights reserved. XML Document Design.](https://reader038.fdocuments.net/reader038/viewer/2022110400/56649da95503460f94a9685e/html5/thumbnails/56.jpg)
TransformingData: XML to HTML
• Advanced matching and selecting• Top-level elements• Instruction elements• Comments
![Page 57: Copyright © 2002 ProsoftTraining. All rights reserved. XML Document Design.](https://reader038.fdocuments.net/reader038/viewer/2022110400/56649da95503460f94a9685e/html5/thumbnails/57.jpg)
MultipleDocument Sources
• The document () function
![Page 58: Copyright © 2002 ProsoftTraining. All rights reserved. XML Document Design.](https://reader038.fdocuments.net/reader038/viewer/2022110400/56649da95503460f94a9685e/html5/thumbnails/58.jpg)
Summary
Describe the relationship between XSL and XSLT
Use XSLT templates and patterns Convert XML to a new XML output document Reorganize XML data to an output file Convert XML to HTML Compile remote data sources into an XML
output file
![Page 59: Copyright © 2002 ProsoftTraining. All rights reserved. XML Document Design.](https://reader038.fdocuments.net/reader038/viewer/2022110400/56649da95503460f94a9685e/html5/thumbnails/59.jpg)
Copyright © 2002 ProsoftTraining. All rights reserved.
Lesson 7:XML Formatting
![Page 60: Copyright © 2002 ProsoftTraining. All rights reserved. XML Document Design.](https://reader038.fdocuments.net/reader038/viewer/2022110400/56649da95503460f94a9685e/html5/thumbnails/60.jpg)
Objectives
• Define XML formatting requirements• Apply CSS to XML• Use XSL flow objects and patterns• Apply XSL to XML• Convert XSL into PDF
![Page 61: Copyright © 2002 ProsoftTraining. All rights reserved. XML Document Design.](https://reader038.fdocuments.net/reader038/viewer/2022110400/56649da95503460f94a9685e/html5/thumbnails/61.jpg)
XMLStyling
• Cascading Style Sheets• Extensible Stylesheet Language
– Language for transforming XML documents– Vocabulary for specifying formatting
semantics
![Page 62: Copyright © 2002 ProsoftTraining. All rights reserved. XML Document Design.](https://reader038.fdocuments.net/reader038/viewer/2022110400/56649da95503460f94a9685e/html5/thumbnails/62.jpg)
XMLand CSS
• The absence of predefined formatting eliminates conflicts between inherent element properties and style properties in XML
![Page 63: Copyright © 2002 ProsoftTraining. All rights reserved. XML Document Design.](https://reader038.fdocuments.net/reader038/viewer/2022110400/56649da95503460f94a9685e/html5/thumbnails/63.jpg)
CSSSyntax
• Selectors• CSS1• XML and CSS tools
![Page 64: Copyright © 2002 ProsoftTraining. All rights reserved. XML Document Design.](https://reader038.fdocuments.net/reader038/viewer/2022110400/56649da95503460f94a9685e/html5/thumbnails/64.jpg)
XMLand XSL
• Areas• Indents
![Page 65: Copyright © 2002 ProsoftTraining. All rights reserved. XML Document Design.](https://reader038.fdocuments.net/reader038/viewer/2022110400/56649da95503460f94a9685e/html5/thumbnails/65.jpg)
FormattingObjects
• Types– Those that generate block and inline areas– Those that return areas but do not generate
them– Those that are used to generate layout
areas
![Page 66: Copyright © 2002 ProsoftTraining. All rights reserved. XML Document Design.](https://reader038.fdocuments.net/reader038/viewer/2022110400/56649da95503460f94a9685e/html5/thumbnails/66.jpg)
XSLPage Layout
• fo:layout-master-set• fo:simple-page-master• fo:region• fo:page-sequence-master
and fo:page-sequence• fo:page-sequence-master sub elements• Content flow objects
![Page 67: Copyright © 2002 ProsoftTraining. All rights reserved. XML Document Design.](https://reader038.fdocuments.net/reader038/viewer/2022110400/56649da95503460f94a9685e/html5/thumbnails/67.jpg)
PageLayout (cont’d)
• fo:block• fo:list-block• fo:table
![Page 68: Copyright © 2002 ProsoftTraining. All rights reserved. XML Document Design.](https://reader038.fdocuments.net/reader038/viewer/2022110400/56649da95503460f94a9685e/html5/thumbnails/68.jpg)
XML, XSL andFormatting Objects
• Transforming an XML document• Processing an XSL style sheet
![Page 69: Copyright © 2002 ProsoftTraining. All rights reserved. XML Document Design.](https://reader038.fdocuments.net/reader038/viewer/2022110400/56649da95503460f94a9685e/html5/thumbnails/69.jpg)
Converting XSLFlow Objects to PDF
• Portable Document Format• Formatting Object Processor
![Page 70: Copyright © 2002 ProsoftTraining. All rights reserved. XML Document Design.](https://reader038.fdocuments.net/reader038/viewer/2022110400/56649da95503460f94a9685e/html5/thumbnails/70.jpg)
Summary
Define XML formatting requirements Apply CSS to XML Use XSL flow objects and patterns Apply XSL to XML Convert XSL into PDF
![Page 71: Copyright © 2002 ProsoftTraining. All rights reserved. XML Document Design.](https://reader038.fdocuments.net/reader038/viewer/2022110400/56649da95503460f94a9685e/html5/thumbnails/71.jpg)
Copyright © 2002 ProsoftTraining. All rights reserved.
Lesson 8:XML Schemas
![Page 72: Copyright © 2002 ProsoftTraining. All rights reserved. XML Document Design.](https://reader038.fdocuments.net/reader038/viewer/2022110400/56649da95503460f94a9685e/html5/thumbnails/72.jpg)
Objectives
• Explain the purpose of schemas• Explain data types and facets• Define attributes and references• Define simple and complex elements• Create an XML schema
![Page 73: Copyright © 2002 ProsoftTraining. All rights reserved. XML Document Design.](https://reader038.fdocuments.net/reader038/viewer/2022110400/56649da95503460f94a9685e/html5/thumbnails/73.jpg)
Schemas
• XML Schema
![Page 74: Copyright © 2002 ProsoftTraining. All rights reserved. XML Document Design.](https://reader038.fdocuments.net/reader038/viewer/2022110400/56649da95503460f94a9685e/html5/thumbnails/74.jpg)
Components
• Schema component categories– Definition components– Declaration components– Model group components– Annotation component
![Page 75: Copyright © 2002 ProsoftTraining. All rights reserved. XML Document Design.](https://reader038.fdocuments.net/reader038/viewer/2022110400/56649da95503460f94a9685e/html5/thumbnails/75.jpg)
DataTypes
• Built-in data types• User-defined data types
![Page 76: Copyright © 2002 ProsoftTraining. All rights reserved. XML Document Design.](https://reader038.fdocuments.net/reader038/viewer/2022110400/56649da95503460f94a9685e/html5/thumbnails/76.jpg)
SchemaElement
• The targetNamespace attribute• The elementFormDefault attribute• Document instance schema reference• Undeclared target namespaces• Annotation• Element declarations• Element references
![Page 77: Copyright © 2002 ProsoftTraining. All rights reserved. XML Document Design.](https://reader038.fdocuments.net/reader038/viewer/2022110400/56649da95503460f94a9685e/html5/thumbnails/77.jpg)
ComplexTypevs. SimpleType
• ComplexType– Elements that contain sub-elements or
carry attributes• SimpleType
– Elements that contain numbers but do not contain sub-elements or attributes
![Page 78: Copyright © 2002 ProsoftTraining. All rights reserved. XML Document Design.](https://reader038.fdocuments.net/reader038/viewer/2022110400/56649da95503460f94a9685e/html5/thumbnails/78.jpg)
Attributes
• The content attribute• User-defined attributes
![Page 79: Copyright © 2002 ProsoftTraining. All rights reserved. XML Document Design.](https://reader038.fdocuments.net/reader038/viewer/2022110400/56649da95503460f94a9685e/html5/thumbnails/79.jpg)
Facets
• Fourteen facets defined by XML Schema
![Page 80: Copyright © 2002 ProsoftTraining. All rights reserved. XML Document Design.](https://reader038.fdocuments.net/reader038/viewer/2022110400/56649da95503460f94a9685e/html5/thumbnails/80.jpg)
Grouping
Element
Element
Element
![Page 81: Copyright © 2002 ProsoftTraining. All rights reserved. XML Document Design.](https://reader038.fdocuments.net/reader038/viewer/2022110400/56649da95503460f94a9685e/html5/thumbnails/81.jpg)
Summary
Explain the purpose of schemas Explain data types and facets Define attributes and references Define simple and complex elements Create an XML schema
![Page 82: Copyright © 2002 ProsoftTraining. All rights reserved. XML Document Design.](https://reader038.fdocuments.net/reader038/viewer/2022110400/56649da95503460f94a9685e/html5/thumbnails/82.jpg)
Copyright © 2002 ProsoftTraining. All rights reserved.
Lesson 9:Extensible Hypertext
Markup Language (XHTML)
![Page 83: Copyright © 2002 ProsoftTraining. All rights reserved. XML Document Design.](https://reader038.fdocuments.net/reader038/viewer/2022110400/56649da95503460f94a9685e/html5/thumbnails/83.jpg)
Objectives
• Identify the reasons for XHTML's development• Identify key features of XHTML documents• Create XHTML documents
![Page 84: Copyright © 2002 ProsoftTraining. All rights reserved. XML Document Design.](https://reader038.fdocuments.net/reader038/viewer/2022110400/56649da95503460f94a9685e/html5/thumbnails/84.jpg)
HTML vs. XML
• Clients• Browser forgiveness• What does HTML forgive?
– Case-sensitivity– Nesting– Closing elements– Attributes
• What does XML not forgive?
![Page 85: Copyright © 2002 ProsoftTraining. All rights reserved. XML Document Design.](https://reader038.fdocuments.net/reader038/viewer/2022110400/56649da95503460f94a9685e/html5/thumbnails/85.jpg)
XHTMLDefinition Variations
• XHTML document declarations– Document type declaration
![Page 86: Copyright © 2002 ProsoftTraining. All rights reserved. XML Document Design.](https://reader038.fdocuments.net/reader038/viewer/2022110400/56649da95503460f94a9685e/html5/thumbnails/86.jpg)
XHTMLConformance Requirements
• Correct case• Root element• Empty elements• Nesting• Fragment identifiers
![Page 87: Copyright © 2002 ProsoftTraining. All rights reserved. XML Document Design.](https://reader038.fdocuments.net/reader038/viewer/2022110400/56649da95503460f94a9685e/html5/thumbnails/87.jpg)
XHTML 1.1and Modules
• XHTML 1.1 versus XHTML (Second Edition)• W3C-approved modules for XHTML 1.1• W3C-approved sub-elements for XHTML 1.1• XHTML 2.0 (2003)
![Page 88: Copyright © 2002 ProsoftTraining. All rights reserved. XML Document Design.](https://reader038.fdocuments.net/reader038/viewer/2022110400/56649da95503460f94a9685e/html5/thumbnails/88.jpg)
Summary
Identify the reasons for XHTML's development Identify key features of XHTML documents Create XHTML documents
![Page 89: Copyright © 2002 ProsoftTraining. All rights reserved. XML Document Design.](https://reader038.fdocuments.net/reader038/viewer/2022110400/56649da95503460f94a9685e/html5/thumbnails/89.jpg)
Copyright © 2002 ProsoftTraining. All rights reserved.
Lesson 10:XML Tools
![Page 90: Copyright © 2002 ProsoftTraining. All rights reserved. XML Document Design.](https://reader038.fdocuments.net/reader038/viewer/2022110400/56649da95503460f94a9685e/html5/thumbnails/90.jpg)
Objectives
• Use XML tools to clean existing documents• Use a DTD editor• Use an editor to create XSL and schemas• Import database information for XML
conversion• Use graphical editors to create XML
documents• Convert XML to various outputs• Define SOAP and BizTalk
![Page 91: Copyright © 2002 ProsoftTraining. All rights reserved. XML Document Design.](https://reader038.fdocuments.net/reader038/viewer/2022110400/56649da95503460f94a9685e/html5/thumbnails/91.jpg)
XMLTools
• Simple tools XML Notepad• Complete tools Arbortext Epic,
XML Spy
![Page 92: Copyright © 2002 ProsoftTraining. All rights reserved. XML Document Design.](https://reader038.fdocuments.net/reader038/viewer/2022110400/56649da95503460f94a9685e/html5/thumbnails/92.jpg)
ToolTypes
• Command-line tools• Visual tools• Graphical tools
![Page 93: Copyright © 2002 ProsoftTraining. All rights reserved. XML Document Design.](https://reader038.fdocuments.net/reader038/viewer/2022110400/56649da95503460f94a9685e/html5/thumbnails/93.jpg)
HTML toWell-Formed XML
• Cleaning an HTML document with TidyGUI
![Page 94: Copyright © 2002 ProsoftTraining. All rights reserved. XML Document Design.](https://reader038.fdocuments.net/reader038/viewer/2022110400/56649da95503460f94a9685e/html5/thumbnails/94.jpg)
Creatinga DTD
• Creating an XML DTD with SML Spy
![Page 95: Copyright © 2002 ProsoftTraining. All rights reserved. XML Document Design.](https://reader038.fdocuments.net/reader038/viewer/2022110400/56649da95503460f94a9685e/html5/thumbnails/95.jpg)
Creatinga Schema
• Creating an XML schema with XML Spy
![Page 96: Copyright © 2002 ProsoftTraining. All rights reserved. XML Document Design.](https://reader038.fdocuments.net/reader038/viewer/2022110400/56649da95503460f94a9685e/html5/thumbnails/96.jpg)
ImportingDatabase Information
• Importing database data• Editing XML code with Epic Editor• Styles• Creating XSL style sheets• One-to-many output• Creating multiple output files from XML
![Page 97: Copyright © 2002 ProsoftTraining. All rights reserved. XML Document Design.](https://reader038.fdocuments.net/reader038/viewer/2022110400/56649da95503460f94a9685e/html5/thumbnails/97.jpg)
XML ProjectManagement Guidelines
• Development– Design the required DTD– Develop style sheets– Store in a repository
• Staffing– Project managers– Application developers– Format/layout designers– Content authors
![Page 98: Copyright © 2002 ProsoftTraining. All rights reserved. XML Document Design.](https://reader038.fdocuments.net/reader038/viewer/2022110400/56649da95503460f94a9685e/html5/thumbnails/98.jpg)
XML-DrivenTechnologies
• Simple Object Access Protocol• BizTalk
![Page 99: Copyright © 2002 ProsoftTraining. All rights reserved. XML Document Design.](https://reader038.fdocuments.net/reader038/viewer/2022110400/56649da95503460f94a9685e/html5/thumbnails/99.jpg)
Summary
Use XML tools to clean existing documents Use a DTD editor Use an editor to create XSL and schemas Import database information for XML
conversion Use graphical editors to create XML
documents Convert XML to various outputs Define SOAP and BizTalk
![Page 100: Copyright © 2002 ProsoftTraining. All rights reserved. XML Document Design.](https://reader038.fdocuments.net/reader038/viewer/2022110400/56649da95503460f94a9685e/html5/thumbnails/100.jpg)
XMLDocument Design
Introduction to XML Well-Formed XML Documents Creating a Valid XML Document XML Parsers The XML Family of Technologies
![Page 101: Copyright © 2002 ProsoftTraining. All rights reserved. XML Document Design.](https://reader038.fdocuments.net/reader038/viewer/2022110400/56649da95503460f94a9685e/html5/thumbnails/101.jpg)
XMLDocument Design
XSL Transformation XML Formatting XML Schemas Extensible Hypertext Markup Language
(XHTML) XML Tools