Register your product to gain access to bonus material or receive a coupon.
Discover how much you can do with just XMLfast!
Building a sophisticated web site doesn't require a Ph.D. in computer science, just the right tools for the joband 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 sitewithout 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:
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!
Click here for a sample chapter for this book: 013018554X.pdf
(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.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, eitherevery 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 Internetand its associated technologiesto 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 nowand 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?
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 Internetparticularly the part of it called the World Wide Webhas 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 editorsuch as Windows Notepad or UNIX viand 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 languageHypertext Markup Language, or HTMLfails 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 alphabetletters 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.
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:
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 mechanismstake one step at a time and you'll do just fine.
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 Internetand think, on the whole, that my life is better because of themthere 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 HTMLalmost 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.
This book consists of five main parts or sections:
Finally, the appendices of Just XML will point you to further referencesmostly on XML, etc., but also a handful (I'm sorry, just can't help myself) on B movies.