1) Tidwell, D. "Introduction to XML" http://www.ibm.com/developerworks/xml/tutorials/xmlintro/?S_TACT=104AHW06 developerWorks http://www.ibm.com/developerworks/xml/tutorials/xmlintro/xmlintro-pdf.pdf
XML = Extensible Markup Language, used to create your own tags
3 kinds of XML documents:
-Invalid documents don't follow syntax rules
-Valid documents follow both XML syntax rules and rules for their DTD or schema
-Well-formed documents follow the XML syntax rules but don't have either a DTD or schema
Comments = can appear anywhere in document, even before or after root element. Commets begin with <!-- and ends with -->.
Document Type Defition (DTD) defines elemnts which can appear in an XML document, the order they appear, and other basic details. Similar to SGML DTDs.
XML Schemas: have more power to define what valid XML documents look like
Document Object Model (DOM): defines set of interfaces to parsed version of XML document. Parser reads document and builds memory tree, so DOM can manipulate tree. Able to see what original doc contained, delete sections of the tree, rearrange the tree, add new branches, etc
2) Uche Ogbuji. A survey of XML standards: Part 1. January 2004. http://www-128.ibm.com/developerworks/xml/library/x-stand1.html
"Namespaces in XML 1.0 [W3C Recommendation] provides a mechanism for universal naming of elements and attributes in XML documents."
"XML Base [W3C Recommendation] provides a means of associating XML elements with URIs in order to more precisely specify how relative URIs are resolved in relevant XML processing actions."
"XML Inclusions (XInclude) 1.0 [in development] provides a system for merging XML documents. XInclude is generally used when you wish to split XML documents into manageable chunks."
"XML Information Set [W3C Recommendation], also known as the XML Infoset, defines an abstract way of describing an XML document as a series of objects, called information items, with specialized properties."
3) XML Schema Tutorial http://www.w3schools.com/Schema/default.asp
"An XML Schema:
defines elements that can appear in a document
defines attributes that can appear in a document
defines which elements are child elements
defines the order of child elements
defines the number of child elements
defines whether an element is empty or can include text
defines data types for elements and attributes
defines default and fixed values for elements and attributes"
"We think that very soon XML Schemas will be used in most Web applications as a replacement for DTDs. Here are some reasons:
XML Schemas are extensible to future additions
XML Schemas are richer and more powerful than DTDs
XML Schemas are written in XML
XML Schemas support data types
XML Schemas support namespaces"
XML Schemas: support data types, XML syntax, secure data information, etc.
Simple element: contains only text
<xs:element name="xxx" type="yyy"/>
where xxx is the name of the element and yyy is the data type of the element.
"Simple elements cannot have attributes. If an element has attributes, it is considered to be of a complex type. But the attribute itself is always declared as a simple type."
<xs:attribute name="xxx" type="yyy"/>
where xxx is the name of the attribute and yyy specifies the data type of the attribute.
Complex element: contains other elements or attributes
A complex XML element, "employee", which contains only other elements:
<employee>
<firstname>John</firstname>
<lastname>Smith</lastname>
</employee>
A complex XML element, "food", which contains only text:
<food type="dessert">Ice cream</food>
A complex XML element, "description", which contains both elements and text:
<description>
It happened on <date lang="norwegian">03.03.99</date> ....
</description>
No comments:
Post a Comment