Exercises Woa
6.3 Create a DTD for Fig. 5.6 letter.xml . 6.4 Create a DTD products, dtd for a retailer with the following specifications The XML document that conforms to the DTD must contain a list of products and manufacturers. Each product should be represented by a product element and each manufacturer should be represented by a manufacturer element. Each manufacturer has a unique ID. Represent details like name, address, etc., as child elements of a manufacturer element. Each product has attributes such...
Objectives 1
To understand what a schema is. To understand the basic differences between DTDs and schema. To be able to create Microsoft XML Schema. To become familiar with both Microsoft XML Schema and W3C XML Schema. To use schema to describe elements and attributes. It is hard to be truly excellent, four-square in hand and foot If you describe things as better than they are, you are considered to be romantic if you describe things as worse than they are, you will be called a realist and if you describe...
DOM with JavaScript
To introduce document manipulation with the XML Document Object Model, we begin with a simple scripting example that uses JavaScript and Microsoft's msxml parser. This example takes an XML document Fig. 8.2 that marks up an article and uses the DOM API to display the document's element names and values. Figure 8.3 lists the JavaScript code that manipulates this XML document and displays its content in an HTML page. Line 15 lt script type text javascript language JavaScript gt Sun Microsystem's...
Info Vea
Chapter 1 Introduction to the Internet and World Wide Web 15 Chapter 17 Perl and XML A Web-based Message Forums Application There are a variety of popular server-side technologies for developing Web-based applications. Historically, the most widely used and the third such technology we cover in this book has been Perl CGI. Despite newer technologies from Microsoft and Sun Active Server Pages ASP and JavaServer Pages, respectively Perl CGI is well entrenched and growing rapidly. Chapter 17...
Answers To Selfreview Exercises Mrc
10.1 Object users is used to store the information of all on-line users in an XML document. It acts as a database on the server side. Class UserThread retrieves the list of current users from object users using MessengerServer method getUsers. It also uses object users to update the list of users whenever a new user logs in or logs out of the system. The content of object users is written to the output stream to update the client. 10.2 Class UserThread acts as an interface between server and...
Info Twl
message, and to send them to the server. The client also has to parse the XML messages received from the server and display them to the user. This messaging system demonstrates how to incorporate XML into all the tiers of a client server interface. It can be expanded to include many more advanced capabilities, but for our purposes, the system we implement provides ample illustration of XML. Because the XmlMessenger uses Sun's Java implementation of the org.w3c.dom package, Chapter 8 is a...
Case Study Writing a Microsoft XML Schema for the Day Planner Application
Figure 7.20 is a Microsoft XML Schema for the day planner introduced in Chapter 5. lt xml version 1.0 gt lt -- Fig. 7.2 0 planner-schema.xml -- gt lt -- Microsoft XML Schema for day planner -- gt lt Schema xmlns xmlns dt lt ElementType name planner content eltOnly model closed gt lt element type year minOccurs 0 maxOccurs gt lt ElementType gt lt ElementType name year content eltOnly model closed gt lt AttributeType name value dt type int gt lt attribute type value gt lt element type date...
Case Study Writing a DTD for the Day Planner Application
In this section, we build upon the case study introduced in Chapter 5. Figure 6.15 lists the external subset of the DTD for the day planner XML document, planner.xml. The following document type declaration is inserted into the day planner XML document lt DOCTYPE planner SYSTEM planner.dtd gt 1 lt -- Fig. 6.15 planner.dtd -- gt 2 lt -- DTD for day planner -- gt 4 lt ELEMENT planner year gt 6 lt ELEMENT year date gt 7 lt ATTLIST year value CDATA REQUIRED gt 9 lt ELEMENT date note gt 10 lt...
Selfreview Exercises Mti
8.1 State whether each of the following are true or false. If false, explain why. a Class XmlDocument is a Sun Microsystem's internal API class. Text in XML document is not represented as a node. A NodeList contains a list of Nodes. Interface CDATASection extends interface CharacterData. Interface Attr extends interface Element. Method parse loads and parses an XML document. Interface ErrorHandler defines methods fatalError, error and warning. Method getElementByTagName of class Element returns...
Introduction Tlv
Instant messaging is one of the fastest growing communications media in history. According to America Online, the pioneer of instant messaging, its instant messaging services grew from 0 to 50 million users in less than three years, and it now has over 64 million users. There are predictions that over 175 million users will be instant messaging by 2002. Instant-messaging applications enable users to instantly send text messages to other users on the Internet. They combine the immediacy of a...
Case Study A Day Planner Application
In this section, we discuss markup used by a day planner application for scheduling appointments. This case study will be enhanced in later chapters. When scheduling appointments and tasks, the date, time and appointment type are required. An XML document that marks up appointments is shown in Fig. 5.10. Line 6 is the root element planner, which holds all of the appointments. Within element planner, we have a year element, which has attribute value for storing the year being planned. If we make...
Introduction Vne
XML provides a way of describing data in a rich, flexible and efficient way by marking up data with descriptive tags. However, XML does not provide a way to locate specific pieces of structured data within a given document. For example, an XML document containing data about books published by Deitel amp Associates, Inc., would need to be parsed and then searched through element by element in order to find a specific book. For large documents, this process could be inefficient and error prone....
Objectives Cpi
To understand how XML can be used with Java to achieve powerful results. To manipulate and traverse the DOM from within a Java application. To understand the advantage of using XML to communicate between the client and the server. To understand the advantage of using XML to store data. To know when it is appropriate to use XML instead of a Java class. What networks of railroads, highways and canals were in another age, the networks of telecommunications, information and computerization are...
Case Study XSLT and XPath
XPath and XSL are intimately related. The examples in this chapter used simple XPath expressions to locate elements, attributes and text in XML documents. In this section, we present a more substantial example that uses more complex XPath expressions. Figure 12.25 marks up information about Deitel amp Associates, Inc.'s complete training course and Web-based training products. The document contains root element product, which has three child elements completeTrainingCourses, books and...
Exercises Rpi
5.5 Create an XML document that marks up the nutrition facts for a package of Grandma Deitel's Cookies. A package of Grandma Deitel's Cookies has a serving size of 1 package and the following nutritional value per serving 260 calories, 100 fat calories, 11 grams of fat, 2 grams of saturated fat, 5 milligrams of cholesterol, 210 milligrams of sodium, 36 grams of total carbohydrates, 2 grams of fiber, 15 grams of sugars and 5 grams of protein.Render the XML documents in Internet Explorer 5. Hint...
Exercises Okj
7.3 Write a Microsoft XML Schema document for the XML document in Fig. 7.2 that would allow element note to be a child element of element myMessage. Element note can contain only text. Validate your document using Microsoft XML Validator. 7.4 Write a schema to validate the XML document shown in Fig. 7.22. This XML document contains information about products in a grocery store. Each product is represented by a product element that contains the name, manufacturer, quantity and price of the...
Exercises 1
Categorize each of the following as an element or an attribute 3.5 What will the frameset produced by the following code look like Assume that the pages being imported are blank with white backgrounds and that the dimensions of the screen are 800 by 600. Sketch the layout, approximating the dimensions. xmlhtp1_03.fm Page 78 Friday, November 30, 2001 9 29 AM xmlhtp1_03.fm Page 78 Friday, November 30, 2001 9 29 AM 78 Introduction to HyperText Markup Language 4 Part II lt frameset rows 20 , gt...
Answers To Selfreview Exercises
1.1 a World Wide Web Consortium. b Recommendations. c Extensible Markup Language. d Extensible Stylesheet Language XSL . e Extensible Linking Language XLink . f Standardized General Markup Language. 1.2 a bandwidth. b Web Accessibility Initiative. c ARPAnet. d bandwidth. e Transmission Control Protocol Internet Protocol. 1.3 a World Wide Web. b Tim Berners-Lee. c Simple Object Access Protocol. d Resource Description Framework RDF . e Scalable Vector Graphics. State whether the following are...



