Why do we need XML?
XML allows data to be categorized outside of its container, in other words, the data is separate from the design, or markup of that data. In this way the data can be extracted, for other purposes, and reused easily. This is important, as businesses have to reuse data many times over, and need to be able to organize it in a way that can be validated. Instead of being lost on a html web page, XML encapsulated information can be reused as often as necessary for a multitude of tasks.
So far we have created and demonstrated ability and knowledge of the following:
- xml
- dtd
- schema: simple and complex types
- namespaces
- validation
- xslt
- css
- xlink & xpointer
- xhtml
Imagine the power of easily managing not just displaying information.
XML Q&A
1. What are the primary differences between XML and HTML?
closing tags are required in xml, not html tags require an ending tag (br and hr and a few others such as the p tag). XML is case sensitive, html isnt, unless its being uploaded to a unix server. Nesting is more important in xml than in html, in this way xml is less forgiving. In xml, any entity reference used except the five built in ones, must be declared in a dtd before being used. XML needs a root element. XML is less lenient.
2. Why was XML created?
Html doesnt allow for the seperation of content from display; ie. the data you are trying to present, isn't seperate from the way the data is displayed. Htmls tags are mostly formatting-oriented, they do not give information about the content of a web page, thus that information is hard to reuse in other applications
3. What business problem does XML solve?
Future proofing data. When the tag identifies data, that data becomes available for other tasks. Instead of lost in an html formatted page, labeled information can be reused as often as necessary.
4. Is XML a language or meta-language? Explain
XML is a meta language, because you use it to create and write other languages.
5. What language was XML and HTML derived from?
SGML, IBM Created SGML
6. Why does XML need to be human and machine readable?
The main reason is when you get other peoples code, you will need to be able to read it. Inevitably, someone will want to look at it, or you will need help, and in a co-authoring environment, we want to write our code in a way that makes it easily understandable what we mean. XML container tags should clarify the contents of the data enclosed within that tag.
7. What are the three requirements for writing well formed XML?
Case, Nesting, All tags must be closed.
8. What is the role of a DTD with XML? (Think valid XML)
A document type definition defines which elements and attributes are allowed or required in a complying document. In order to verify our document is valid, it must conform too all the rules specified in the DTD.
9. Write a very short DTD document
<!ELEMENT animal (name+, threats, weight?, length?, source, picture, subspecies*)
<!ELEMENT threats (threat, threat, threat+)>
10. What is the role of CSS with XML?
A list of styles or rules, that you define for formatting the elemetns in xml. The style sheet is typically a seperate document, and this allows for the seperation of the data from its markup.
11. Write very short CSS document
endangered_species {display:block;color:magenta}
12. What is the role of XSD with XML? (Think namespaces and datatypes)
A schema, defines what a given set of one or more xml documents can look like: what elemets they contain, and in what order, and what their content may be, and attributes they might contain. In a schema, a document is divided into two types of content: simple and complex. The simple can contain only text, the complex can contain other elements or attributes are complex. Complex elements tend to describe the structure of a document, rather than its content.
13. Write a very short XSD document
<xsd:element name="weight" type="xsd.string"/>
<xsd:element name="population" type="xsd:integer"/>
14. Why are namespaces important to XSD? (Think about the Web as a database)
Namespaces allow for a superlabel that can distinguish all your elements from mine. A superlable is useful when multiple xsd's are created or combined. A superlabel is a namespace, the namespace itself is a collection of related element names identified by the namespace name. Its important to xsd, so that when you combine xsd'd, the "source element data" wont get overwritten, ad become meaningless.
15. Compare and contrast DTDs with XSD
Dtd's are written in a syntax that has little to do with xml, and thus cannot be parsed by an xml parser. Second all the declarations in a DTD are global, which means you cant define two different elements with the same name. DTD's cannot control what kind of information a given element or attribute can contain.
16. Compare and contrast CSS with XSLT
XSLT needs a namespace declaration. You can do batch processing, and for-each slects, theres alot more flexibility in XSLT. You can do sorting, apply template rules, test expressions, write if statements, alot more flexible than css, which has none of these abilities.
17. What is XSL or XSLT? XSL Transformations (XSLT) is a standard way to describe how to transform (change) the structure of an XML (Extensible Markup Language) document into an XML document with a different structure. XSLT is a Recommendation of the World Wide Web Consortium . XSLT can be thought of as an extension of the Extensible Stylesheet Language XSL is a language for formatting an XML document (for example, showing how the data described in the XML document should be presented in a Web page). XSLT shows how the XML document should be reorganized into another data structure (which could then be presented by following an XSL style sheet . XSLT is used to describe how to transform the source tree or data structure of an XML document into the result tree for a new XML document, which can be completely different in structure. The coding for the XSLT is also referred to as a style sheet and can be combined with an XSL style sheet or be used independently
18. What is RDF?
Research Description Framework- An RDF description can include the authors of the resource, date of creation or updating, the organization of the pages on a site (the sitemap), information that describes content in terms of audience or content rating, key words for search engine data collection, subject categories, and so forth. The Resource Description Framework will make it possible for everyone to share Web site and other descriptions more easily and for software developers to build products that can use the metadata to provide better search engines and directories, to act as intelligent agents, and to give Web users more control of what they're viewing.
19. What is XLink and XPointer?
XPointer is a language for locating data within an Extensible Markup Language document based on properties such as location within the document, character content, and attribute values. XPointer consists of a description that comes after the # symbol in a Uniform Resource Locator. XPointer can be used alone or together with another language for locating data within an XML document. In Hypertext Markup Language, the # symbol enables linking to a specific marked point within an HTML page. XPointer allows linking to a point based on content as well. In this way, a reader can, for example, be enabled to link to the next instance of a certain word, phrase, or sequence of characters within an XML document. An XLink link is an explicit relationship between resources or portions of resources.This specification defines the XML Linking Language (XLink), which allows elements to be inserted into XML documents in order to create and describe links between resources
20. What is EAI? Why is XML useful in EAI?
Enterprise Application Integration (middleware, glueware) EAI (enterprise application integration) is a business computing term for the plans, methods, and tools aimed at modernizing, consolidating, and coordinating the computer applications in an enterprise . Typically, an enterprise has existing legacy applications and databases and wants to continue to use them while adding or migrating to a new set of applications that exploit the Internet, e-commerce , extranet and other new technologies. EAI may involve developing a new total view of an enterprise's business and its applications, seeing how existing applications fit into the new view, and then devising ways to efficiently reuse what already exists while adding new applications and data.
EAI encompasses methodologies such as object-oriented programming, distributed, cross-platform program communication using message brokers with Common Object Request Broker Architecture and COM+, the modification of enterprise resource planning (ERP) to fit new objectives, enterprise-wide content and data distribution using common databases and data standards implemented with the Extensible Markup Language (XML, middleware,message queueing, and other approaches.
21. Compare and contrast middleware with EAI
EAI (enterprise application integration) is a business computing term for the plans, methods, and tools aimed at modernizing, consolidating, and coordinating the computer application s in an enterprise. Middleware is the actual software and harware that makes it happen. Also called gluware, because it binds to otherwise seperate applications.
22. How does Microsoft use XML? Microsoft uses XML throught its office product suite. For example, when you export a word document to html, take a look and youll see xml embedded. In all of microsofts products you will see the use of xml.
23. How does Sun use XML? Sun integrates xml into its java so that you can create cross platform java applets that are based on xml data. In this way the xml data is seperated from the markup itself.
24. How is UDDI and SOAP different than RDF? Universal Definition and Discovery
25. How will you use XML?
26. Is XML easier to learn and use than HTML?
I feel xml is easier to learn, because its tags are descriptive of the data that ecloses it.
27. Will XML completely replace HTML (soon or ever?)
HTML is littered everywhere on the web, and although xml may be a .. I think we will see a continutation of html and xml combined for many years, and that html is not going anywhere soon. |