Home > Store

Just XML, 2nd Edition

Register your product to gain access to bonus material or receive a coupon.

Just XML, 2nd Edition

Book

  • Sorry, this book is no longer in print.
Not for Sale

About

Features

  • NEW - Smarter XML document hyperlinking with Xlink and Xpointer.
  • NEW - Updated tips on compatibility with the latest browser versions.
  • NEW - Appendix—“The FixML Files, ” including a complete sample DTD, XML documents, and CSS and XSLT stylesheets.
  • NEW - Today's best XML tools—And what's in store for the future.
  • NEW - XML basics—All you need to get started fast.
  • NEW - CSS and XSLT—Displaying and restructuring XML documents for maximum impact.
  • NEW - Rolling you own—Building custom XML solutions for virtually any problem.

Description

  • Copyright 2001
  • Edition: 2nd
  • Book
  • ISBN-10: 0-13-018554-X
  • ISBN-13: 978-0-13-018554-9

Discover how much you can do with just XML—fast!

Building a sophisticated web site doesn't require a Ph.D. in computer science, just the right tools for the job—and no tool offers you more power than XML. Best of all, it's a lot easier to get results with XML than you think! In Just XML, Second Edition, John E. Simpson shares the simple secrets behind XML, showing how to add meaning and functionality to your web site—without complicated code, compilers, or development kits. Simpson walks you step-by-step through all the basics of creating and maintaining your own customizable XML applications, including:

  • XML basics: all you need to get started-fast!
  • Smarter XML document hyperlinking with XLink and XPointer
  • CSS and XSLT: displaying and restructuring XML documents for maximum impact
  • Rolling your own: building custom XML solutions for virtually any problem
  • Updated tips on compatibility with the latest browser versions
  • New appendix, "The FlixML Files," including a complete sample DTD, XML documents, and CSS and XSLT stylesheets
  • Today's best XML tools—and what's in store for the future

Drawing on everyday examples from daily newspapers to 1950's "B" movies, Just XML, Second Edition gets you rolling with XML faster than you ever thought possible! Sure, you'll learn the theory you need along the way, but most important, you'll be using XML from the very beginning. Before you waste time and money learning more complicated approaches to Web development, discover how much you can do with Just XML!

Sample Content

Downloadable Sample Chapter

Click here for a sample chapter for this book: 013018554X.pdf

Table of Contents

(NOTE: Most chapters conclude with a Summary and Terms Defined in This Chapter.)

I. XML BASICS.

1. Markup Laid Down.

Revealing Codes. Shades of Meaning. Simplify, Simplify, Simplify. The Rules of the Markup Game. The XML Difference. A Markup Cartoon. Meanwhile, Back in the Real World. What XML Isn't. What XML Is. From the Sublime to the Ridiculous. Just FlixML. The Nature of the Beast.

2. Breaking the Ice.

How Valid Is It? The DTD. XML Parsers. Rules of Thumb. Tags. Case Sensitivity. Whitespace Handling. Anatomy of an XML Document. The Prolog. The Root Element. The Epilog.

3. Into the Root.

Naming of Parts. Elements. Entities. Comments. Processing Instructions (PIs). Marked Sections. Multimedia. Notations. Namespaces. Declaring the Prefix. Using Namespaces. Namespace Controversy. XML Markup Covered in This Chapter.

II. XML LINKING.

4. Why XLink?

Linking Basics. A Short (Refresher) Course in HTML Linking. Trouble in Hyperlink Paradise. Each HTML Link Goes from One Single Point to a Single Other Point on the Web. Each HTML Hyperlink Retrieves the Entire Document to Which It Links. What HTML Has Put Asunder, HTML Cannot (Easily) Join Together. Only One Thing Can Happen When You Click on a Bit of Linked Text. Using Fragment Identifiers Requires Changes to the Linked Resource. An HTML Hyperlink Goes Only in One Direction. For Any HTML Hyperlink to Work, Its Originator Needs to Know Something Specific about the Target's Content. XML Linking: The Back Story. All Aboard the Digression Express. Tracks, Stations, Tickets to Nowhere, Derailments. One-Way Tickets: HTML Linking. Two-Way, Three-Way, Twenty-Way Tickets: Xlinking.

5. XLink: Getting from Here to There.

Words, Words. Resources. Locators. Links. Traversal. Arcs. Anatomy of an Xlink. Xlinking with Reserved Attribute Names. Simple Xlinks. Href=“Url.” Role=“Value.” Title=“Value.” Show=“Value.” Actuate=“Value.” From the Ground Up (But Not Too Far Up). Linking Elements in Valid XML Documents. Linking Elements in Well-Formed XML Documents. Extending Links to a New Plane. Breaking the Link. Attributes for Extended Links. To=“Value.” From=“Value.” In Search of the Lost Arc. Coding Extended Xlinks. Ruffles and Flourishes. Arcs. Titles. Out-of-Line Extended Links. The Twilight Zone: External Linksets. How Not to Link to the Whole Xlink Universe.

6. XPointers and XPath: The “Where” of XML.

Xpointing The Way. Why Xpointers? Using an Xpointer. Making Xpointers Fail-Safe. Getting around Downtown: Xpath. A Sample Document. Words and Concepts. Coming Down to Earth: Xpath Syntax. Location Step Shortcuts. Elaborations on a Theme. Functions. Xpointer Extensions to Xpath. Points and Ranges. One More Extension.

III. XML: DOING IT IN STYLE.

7. XML and Cascading Style Sheets.

The Style Problem. And Now along Comes XML. The Style Sheet Solution. Cascading Style Sheets. About That “Cascading.” Declaring a CSS for XML Documents. Basic CSS Syntax. An Example. More Advanced CSS2 Syntax. Attribute-Specific Selectors. “Generating” Content for Non-Content Elements. Hiding Element Content. User Interface Controls. Aural Style Sheets. CSS2 Shortcuts. The Universal Selector. Shorthand Properties. Multiple Selectors, Same Properties. Elements within Elements.

8. Transforming XML with Style: XSL.

Why XSL(T)? Style by Transforming. Separate Transforming and Display Standards. Syntax. Differences between CSS2 and XSL. Lineage. Structure-Awareness. Structure-Reordering. Sophisticated, Quasi-Programming Features. Support for Multiple Media Types. Other Key XSL(T) Concepts. Relationship to Xpath: Nodes. Source and Result Trees. Linking to an XSLT Style Sheet. Anatomy of sn XSL Style Sheet. XSLT snd Namespaces. The XSLT Element Hierarchy. HTML Recap. Template Rules. Conflict Resolution. Built-In Template Rules. XSLT Stylesheet Syntax. A Big Example. Templates from the Ground Up. Adding Specific Template Rules. Little Funny Bits: “Special” Text. Using Xsl: Text to Output Text. Controlling the Overall Form with Xsl: Output. Whitespace Behavior with Xsl: Strip- and Xsl: Preserve-Space. Making Life Easier. Named Attribute Sets. Named Templates. Variables and Parameters. External Resources. Importing and Including Other Stylesheets. Accessing Multiple Source Trees.

IV. ROLLING YOUR OWN XML APPLICATION.

9. The XML DTD.

Why a DTD? Consistency. Rigor. XML Features Requiring A DTD. Getting Started. Is There Already a DTD You Can Use? Your Information's Structure. Ease of Use. Complete, but Not Too Complete. Types of XML Document Content. Parsed Character Data. Nonparsed Character Data. “Empty Data.” Back to the Road Map. Boxes at the Bottom: EMPTY or #PCDATA? All Other Boxes. A Complete (More or Less) Road Map. Anatomy of A DTD. Structure. Appearance. DTD Syntax. Comments. Elements. The Content Model. Attributes. Attribute Values and Constraints. Attribute Types. Attribute Default Specification. Multiple Attribute Declarations for an Element. Entities. General Entities. Character Entities. Parameter Entities. Unparsed (Binary or Otherwise) Entities. Notations.

V. XML DIRECTIONS.

10. XML Software.

State of the Art. Sample XML Code. XML Software Categories. Parsers. Jeremie Miller's Xparse. SAX. (R)Lfred. Document Editors. Wordperfect. Xeena. DTD Editors/Generators. XML Spy. Dtdgenerator. Style Sheet Tools. Homesite Style Editor. Excelon Stylus. Stylesheet Processors. XT. SAXON. XML-Ized Generic Web Browsers. Microsoft Internet Explorer 5 (IE5). Mozilla/Netscape.

11. Whither XML?

Upcoming XML Specifications. Core XML Working Group. XML Linking: XLink/XPointer. XML Query. XML Schema. XSL Formatting Objects. Document Object Model (DOM). XML and Data. RDF. XML Vocabularies. SVG: Scalable Vector Graphics. XBEL: XML Bookmark Exchange Language. Whither You? Where to Go from Here.

APPENDICES.

Appendix A: The FlixML Files.

The FlixML DTD (Version 3.0). Sample FlixML Review. carnival_of_souls.xml. detour.xml. XSLT Stylesheet. flixml.xsl. CSS2 Stylesheet. flixml_in_html.css.

Appendix B: Other Resources.

XML-Related W3C Specifications/Proposals. Other Web Resources. Mailing Lists and Newsgroups. B Movie Information. Web Resources. Books. Videotape/DVD Distributors.

Index.

Preface

Preface

Why did I write Just XML? It's a fair question. (And I won't even ask you in return to address its obvious flip side: Why are you reading it? I hope to answer that for you in a moment.)

The short answer is that I wrote this book because I work with computers every day and want them to be more useful than they already are. Not just for me, either—every week I meet a hundred-odd people (some of them quite odd, but that's a subject for a different book) who are baffled by the failure of computers to "think" the same way we do.

A longer, more precise answer is that I want the Internet to be more useful: When I type a keyword or phrase in a Web search engine, I don't want a list of ten thousand alleged "hits" returned, sorted by a relevance that some machine has calculated based on an algorithm that may or may not have much to do with the documents' actual substance. I want the Internet—and its associated technologies—to be smart about all the information it holds: to understand itself, I guess you might say. And I believe that the Extensible Markup Language, or XML, is the surest route to that ideal right now—and the faster it spreads, the faster we'll get there.

Which brings us to a natural corollary: Why, specifically, might you want to read Just XML as opposed (or in addition) to a hundred other books on the same topic?

Why Just XML?

Let's break that section heading into two separate questions: "Why 'just'?" and "Why XML?" And let's consider the second question first.

Unless you've been in a technological fog for the last five years or so, you already know that the Internet—particularly the part of it called the World Wide Web—has taken the developed world by storm. Everyone from the largest multinational corporation to the neighborhood butcher lists his or her own www.companyname.com in the Yellow Pages. It's leached into the daily lives not just of corporate and government entities, but even of everyday people (school-age children have their own home pages).

You may also know that what underlies all the Web's exhilarating breadth of content and style is a simple secret, not exactly a dirty one, but one still capable of shocking innocent newcomers: It's all just text. Regular text is bracketed with special strings of other text that instructs a user's browser to render the enclosed matter in some particular style. For example, the tags (as these bracketing strings are called) <em> and </em> say, "Render everything between the opening <em> and the closing </em> in an emphasized form." (What "emphasized" means is left up to the browser, but it almost always means italicized.) You don't need any exotic software to create these marked-up text files, although such software is certainly available; all you need is a plain old text editor—such as Windows Notepad or UNIX vi—and a facility for getting at the <, >, and / keys without breaking your train of thought.

That's all well and good, as my grandmother might have said, but it doesn't go far enough. I'll give you some detailed reasons why in Chapter 1, "Markup Laid Down," but for now, just take it on faith that the Web's established markup language—Hypertext Markup Language, or HTML—fails to establish meaning for elements of the documents in which it's written. Furthermore, if you're creating your Web files in Tokyo, you'd better forget about using that nifty new Kanji keyboard: HTML makes easy use of only the characters in the Roman alphabet—letters A through Z and digits 0 through 9. XML easily bests HTML on both counts.

Now about that "Just" in the title...

As you'll see, XML shares some of HTML's bloodlines. Many of the folks responsible for getting HTML off the ground, as well as its decades-old parent SGML (Standardized General Markup Language), were involved in the development of the XML standard, too. But both HTML and SGML are different beasts than XML, requiring different mindsets to use. I believe that it's not only possible but desirable (if XML is to take off at all) to learn XML without requiring any knowledge at all of its forebears. So you won't find much help here if you're interested primarily in them.

(If you snoop around a bit on the subject of XML, you'll also find copious references elsewhere to Java and other programming languages. That's largely because XML is still so new that many of its adherents are involved in developing the software that will process XML, and such folks are naturally concerned with language-specific approaches to handling the new markup style. Just XML doesn't have much to say about Java, C++, et al., either.)

So while you're going through this book, put away the wheelbarrows full of knowledge and predispositions you may have acquired about SGML, HTML, and so on. Concentrate on what you want your Web site to say, and on learning how to make it say that, uniquely.

Repeat to yourself: Just XML.

Some Things about Me
  (and what they imply about you)

First, you need to know that I'm not an SGML guru. In fact, before beginning the first edition of this book, I knew virtually nothing at all about it. A friend of mine worked in the late 1980s and early 1990s on a project called EDGAR, an SGML application used by the federal Securities & Exchange Commission; I could tell from the bleary-eyed look in this friend's eyes, and implicit in her e-mail messages, that learning or using SGML was not something to be endeavored casually. Beyond that, I knew nothing except very basic principles (such as that HTML was some kind of SGML derivative).

I have been a computer applications developer (read "programmer") since 1979. Most of my early work was on mainframe computers, and I graduated thence to UNIX-based minis, and eventually to PCs. My first Internet use was in 1991. I built my first Web page in 1994. My "day job" is as an applications developer, mostly using Microsoft Access and Visual Basic 5.0, and I'm the Webmaster for my department's Web site; in my spare time I also maintain the site for Anhinga Press, a publisher of poetry, at www.anhinga.org

Why this dreary recitation of a resume?

No, I'm not fishing for job offers (I'm quite happy where I am). Really, all I want to do is reassure you that, in my opinion, in order to understand and use XML productively:

  • You don't have to know anything at all about SGML; and
  • You don't need to know anything at all about HTML (although a general understanding of how it works will help).

In general, I believe that anyone with a basic modicum of intelligence and some simple prior exposure to the Web can understand and use XML. Don't worry about the apparent strangeness of some of its concepts and mechanisms—take one step at a time and you'll do just fine.

Ulterior Motives

All right, I confess: There's more to the "why I wrote this book" than all that noble (however sincere) folderol I mentioned at the outset.

The fact is, although I work all day with computers and the Internet—and think, on the whole, that my life is better because of them—there are times when I'm heartily sick of the things. (Not just when they're not working right, either; sometimes I'm so fed up with just sitting in front of them that I'll drop a favorite, entirely smooth-running game before I even have a chance to figure out the first riddle.)

At such times there's nothing I like better than channel surfing for a movie I've never seen. Even better is a trip to the video-rental store, where I've got some element of control over the selection.

And I'm not talking about recent box-office big hits, either. I mean oddball little films, probably cranked out in black and white in the 1940s through 1960s: the ones featuring casts whose names you can't recall fifteen minutes after they've rolled over the screen (while some corny, likewise forgettable score drones or tootles in the background); the ones whose plots revolve around mysterious creatures from other planets, or unlikely chains of criminal circumstance on our own planet, or men in combat fatigues baring their shallow souls to one another while tinny post-production gunfire whizzes and whines overhead. I mean, in short, B movies.

In thinking about B movies, I realized something wonderful about XML: I can think about B movies a lot using XML as a tool for describing them. This would have been nearly impossible to do fully with pure HTML—almost certainly requiring me to write a customized, hard-to-maintain program in Perl or some other Web programming language. It'll be a snap (well, almost a snap!) in XML, though.

So throughout this book, be prepared to think not just about XML, but about low-budget cinema (or at least cinema that frequently looks as if it's low-budget) as well.

How Just XML Is Organized

This book consists of five main parts or sections:

  • Part 1, XML Basics, will introduce you to everything you need to know about XML itself. (The "basics" in the title simply means XML as a distinct element apart from its closely-related technologies covered in the remaining parts.) This part will also introduce you to FlixML, a customized XML lingo for communicating information about (yes) B movies.
  • Part 2, XML Linking, covers XML's tools for hyperlinking documents to one another (or to other parts of the same document) in ways not remotely possible with HTML.
  • Part 3, XML: Doing It in Style, details the use of Cascading Style Sheets (CSS) and Extensible Stylesheet Language Transformations (XSLT). With these two languages you'll tell browsers how to transform the structure of and display your fully linked XML documents for maximum impact. By the end of this section, you'll know everything you need to create a "database" of your own, using FlixML to describe B movies.
  • In Part 4, Rolling Your Own XML Application, you'll learn how to develop a Document Type Definition (DTD) for your own purposes, freeing you (should you want to be freed!) forever from thinking that XML is capable of describing only B movies.
  • Part 5, XML Directions, discusses—and shows examples of—the range of XML-related software available as of this writing. It also covers what's in store for XML-related technologies for the foreseeable future.

Finally, the appendices of Just XML will point you to further references—mostly on XML, etc., but also a handful (I'm sorry, just can't help myself) on B movies.

Updates

Submit Errata

More Information

InformIT Promotional Mailings & Special Offers

I would like to receive exclusive offers and hear about products from InformIT and its family of brands. I can unsubscribe at any time.

Overview


Pearson Education, Inc., 221 River Street, Hoboken, New Jersey 07030, (Pearson) presents this site to provide information about products and services that can be purchased through this site.

This privacy notice provides an overview of our commitment to privacy and describes how we collect, protect, use and share personal information collected through this site. Please note that other Pearson websites and online products and services have their own separate privacy policies.

Collection and Use of Information


To conduct business and deliver products and services, Pearson collects and uses personal information in several ways in connection with this site, including:

Questions and Inquiries

For inquiries and questions, we collect the inquiry or question, together with name, contact details (email address, phone number and mailing address) and any other additional information voluntarily submitted to us through a Contact Us form or an email. We use this information to address the inquiry and respond to the question.

Online Store

For orders and purchases placed through our online store on this site, we collect order details, name, institution name and address (if applicable), email address, phone number, shipping and billing addresses, credit/debit card information, shipping options and any instructions. We use this information to complete transactions, fulfill orders, communicate with individuals placing orders or visiting the online store, and for related purposes.

Surveys

Pearson may offer opportunities to provide feedback or participate in surveys, including surveys evaluating Pearson products, services or sites. Participation is voluntary. Pearson collects information requested in the survey questions and uses the information to evaluate, support, maintain and improve products, services or sites, develop new products and services, conduct educational research and for other purposes specified in the survey.

Contests and Drawings

Occasionally, we may sponsor a contest or drawing. Participation is optional. Pearson collects name, contact information and other information specified on the entry form for the contest or drawing to conduct the contest or drawing. Pearson may collect additional personal information from the winners of a contest or drawing in order to award the prize and for tax reporting purposes, as required by law.

Newsletters

If you have elected to receive email newsletters or promotional mailings and special offers but want to unsubscribe, simply email information@informit.com.

Service Announcements

On rare occasions it is necessary to send out a strictly service related announcement. For instance, if our service is temporarily suspended for maintenance we might send users an email. Generally, users may not opt-out of these communications, though they can deactivate their account information. However, these communications are not promotional in nature.

Customer Service

We communicate with users on a regular basis to provide requested services and in regard to issues relating to their account we reply via email or phone in accordance with the users' wishes when a user submits their information through our Contact Us form.

Other Collection and Use of Information


Application and System Logs

Pearson automatically collects log data to help ensure the delivery, availability and security of this site. Log data may include technical information about how a user or visitor connected to this site, such as browser type, type of computer/device, operating system, internet service provider and IP address. We use this information for support purposes and to monitor the health of the site, identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents and appropriately scale computing resources.

Web Analytics

Pearson may use third party web trend analytical services, including Google Analytics, to collect visitor information, such as IP addresses, browser types, referring pages, pages visited and time spent on a particular site. While these analytical services collect and report information on an anonymous basis, they may use cookies to gather web trend information. The information gathered may enable Pearson (but not the third party web trend services) to link information with application and system log data. Pearson uses this information for system administration and to identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents, appropriately scale computing resources and otherwise support and deliver this site and its services.

Cookies and Related Technologies

This site uses cookies and similar technologies to personalize content, measure traffic patterns, control security, track use and access of information on this site, and provide interest-based messages and advertising. Users can manage and block the use of cookies through their browser. Disabling or blocking certain cookies may limit the functionality of this site.

Do Not Track

This site currently does not respond to Do Not Track signals.

Security


Pearson uses appropriate physical, administrative and technical security measures to protect personal information from unauthorized access, use and disclosure.

Children


This site is not directed to children under the age of 13.

Marketing


Pearson may send or direct marketing communications to users, provided that

  • Pearson will not use personal information collected or processed as a K-12 school service provider for the purpose of directed or targeted advertising.
  • Such marketing is consistent with applicable law and Pearson's legal obligations.
  • Pearson will not knowingly direct or send marketing communications to an individual who has expressed a preference not to receive marketing.
  • Where required by applicable law, express or implied consent to marketing exists and has not been withdrawn.

Pearson may provide personal information to a third party service provider on a restricted basis to provide marketing solely on behalf of Pearson or an affiliate or customer for whom Pearson is a service provider. Marketing preferences may be changed at any time.

Correcting/Updating Personal Information


If a user's personally identifiable information changes (such as your postal address or email address), we provide a way to correct or update that user's personal data provided to us. This can be done on the Account page. If a user no longer desires our service and desires to delete his or her account, please contact us at customer-service@informit.com and we will process the deletion of a user's account.

Choice/Opt-out


Users can always make an informed choice as to whether they should proceed with certain services offered by InformIT. If you choose to remove yourself from our mailing list(s) simply visit the following page and uncheck any communication you no longer want to receive: www.informit.com/u.aspx.

Sale of Personal Information


Pearson does not rent or sell personal information in exchange for any payment of money.

While Pearson does not sell personal information, as defined in Nevada law, Nevada residents may email a request for no sale of their personal information to NevadaDesignatedRequest@pearson.com.

Supplemental Privacy Statement for California Residents


California residents should read our Supplemental privacy statement for California residents in conjunction with this Privacy Notice. The Supplemental privacy statement for California residents explains Pearson's commitment to comply with California law and applies to personal information of California residents collected in connection with this site and the Services.

Sharing and Disclosure


Pearson may disclose personal information, as follows:

  • As required by law.
  • With the consent of the individual (or their parent, if the individual is a minor)
  • In response to a subpoena, court order or legal process, to the extent permitted or required by law
  • To protect the security and safety of individuals, data, assets and systems, consistent with applicable law
  • In connection the sale, joint venture or other transfer of some or all of its company or assets, subject to the provisions of this Privacy Notice
  • To investigate or address actual or suspected fraud or other illegal activities
  • To exercise its legal rights, including enforcement of the Terms of Use for this site or another contract
  • To affiliated Pearson companies and other companies and organizations who perform work for Pearson and are obligated to protect the privacy of personal information consistent with this Privacy Notice
  • To a school, organization, company or government agency, where Pearson collects or processes the personal information in a school setting or on behalf of such organization, company or government agency.

Links


This web site contains links to other sites. Please be aware that we are not responsible for the privacy practices of such other sites. We encourage our users to be aware when they leave our site and to read the privacy statements of each and every web site that collects Personal Information. This privacy statement applies solely to information collected by this web site.

Requests and Contact


Please contact us about this Privacy Notice or if you have any requests or questions relating to the privacy of your personal information.

Changes to this Privacy Notice


We may revise this Privacy Notice through an updated posting. We will identify the effective date of the revision in the posting. Often, updates are made to provide greater clarity or to comply with changes in regulatory requirements. If the updates involve material changes to the collection, protection, use or disclosure of Personal Information, Pearson will provide notice of the change through a conspicuous notice on this site or other appropriate way. Continued use of the site after the effective date of a posted revision evidences acceptance. Please contact us if you have questions or concerns about the Privacy Notice or any objection to any revisions.

Last Update: November 17, 2020