Follow Slashdot blog updates by subscribing to our blog RSS feed

 



Forgot your password?
typodupeerror
×
Programming Books Media Book Reviews IT Technology

XML in a Nutshell 122

The indefatigable chromatic wrote this review of what sounds like another solid offering from the hard workers at O'Reilly & Associates. If you're in the market for dead-tree references to XML, it probably belongs on your list of candidates.
XML in a Nutshell
author Elliotte Rusty Harold & W. Scott Means
pages 480
publisher O'Reilly & Associates
rating 8.5
reviewer chromatic
ISBN 0-596-00058-8
summary A solid and useful reference for XML developers.

The Scoop

While one of the original goals of XML was to create a specification simple enough that a computer science student could produce a working parser in a week, a few new developments have complicated things slightly. The sea of W3C-recommended acronyms includes namespaces, XPath, XSL, XPointers, schemas, and dozens of specific XML applications. Adopting the simple rules of well-formed data helps, but the quickly-growing stable of related technologies is enough to make the sturdiest information architect weep. The specifications aren't as easy to read as, say, the latest Terry Pratchett novel, either.

XML in a Nutshell covers just the most important concepts. Cleanly written, it walks through the XML aspects likely to be used in most projects. As it assumes existing familiarity with the subjects, it does not spend much time in tutorial mode. Instead, these are the guts of the subjects, arranged nicely in dissection jars.

The first section covers XML basics. This includes the ubiquitous grove of angle brackets, the semantic intent and implication, a good chapter on DTDs, as well as internationalization concerns. The short discussion of namespaces is the clearest explanation this author has yet encountered.

Part two delves further into the reasons for using XML, exploring documents that use the structure to explain semantic relationships. DocBook and XHTML appear, as extended examples. Further, it explores the assistive technologies of XSL, XPath, XLinks, and XPointers. Again, the discussions of XSL and XPath compare very favorably to longer works, intended as tutorials. A brief examination of CSS and XSL Formatting Objects rounds out the section.

Part three explores the use of XML as a data transport. In this section, programming languages come into play. There's a strong hint of Java in the air, though most of the discussion follows a language-neutral path. Both the DOM and SAX parsing models have a dedicated chapter. They're short, but the essential pieces are described simply and effectively.

The final section makes or breaks the book. Luckily, XML in a Nutshell won't have much chance to gather dust. The two-hundred page reference section includes the most useful information. There's an annotated copy of the XML 1.0 Reference, arranged logically. The XSL reference, in particular, is quite good. DOM and SAX programmers will also enjoy their respective chapters. Finally, it's nice to have a large set of printed character tables handy.

What's to Consider

The parsing examples don't go much beyond DOM or SAX, and there's more than a strong Java flavor. (Of course, the models are very similar in most modern languages.) As well, some of the class interfaces in the SAX reference are hard to read. This is probably due to the complexity of the information instead of any editorial decision. There's also little discussion of actual XML applications. Instead, the book covers the principles behind perhaps 90% of XML usage. Again, this is not a complaint, just a clarification of the intended audience.

The Summary

The value of XML in a Nutshell should be readily apparent to XML developers. The material is well-organized and concise. It's a quintessential Nutshell book, upholding a tradition of utility and quality. Readers who've already been exposed to the presented material will likely keep this book close at hand.

Table of Contents

  1. XML Concepts
    1. Introducing XML
    2. XML Fundamentals
    3. Document Type Definitions
    4. Namespaces
    5. Internationalization
  2. Narrative-Centric Documents
    1. XML as a Document Format
    2. XML on the Web
    3. XSL Transformations
    4. XPath
    5. XLinks
    6. XPointers
    7. Cascading Stylesheets (CSS)
    8. XSL Formatting Objects (XSL-FO)
  3. Data-Centric Documents
    1. XML as a Data Format
    2. Programming Models
    3. Document Object Model (DOM)
    4. SAX
  4. Reference
    1. XML 1.0 Reference
    2. XPath Reference
    3. XSLT Reference
    4. DOM Reference
    5. SAX Reference
    6. Character Sets


You can purchase this book at Fatbrain.

This discussion has been archived. No new comments can be posted.

XML in a Nutshell

Comments Filter:
  • Great Book... (Score:2, Insightful)

    by DA_MAN_DA_MYTH ( 182037 ) on Thursday September 13, 2001 @12:09PM (#2292530) Homepage Journal
    the only problem is, I learned a lot of the concepts, however I usually learn a lot faster with code examples. Anyways the SAX and DOM areas have a little bit of code, but do not go into huge parsing examples. (Maybe I read it wrong...) Good book O'Reilly usually doesn't put out bad ones. Hopefully there will be Java / XML Cookbook. (I know there already is a Java Cookbook) I love those...
  • by TechnoVooDooDaddy ( 470187 ) on Thursday September 13, 2001 @12:11PM (#2292546) Homepage
    *sigh* xml is NOT JUST A WEB TECHNOLOGY...

    think of XML as the ultimate replacement for the comma delimited file.. it's delimited data, that's all.. has a lot of extensions hung on it, lots of neat features, handles hierarchial data pretty well, but it's JUST A MARKUP LANGUAGE..

    damn.. ok, i'm done now
  • by nachoman ( 87476 ) on Thursday September 13, 2001 @12:18PM (#2292598)
    XML != just a web technology...

    XML is much more that a technology for the web. Many applications are written today using XML for config files, data transmission protocols as well as many other things which make data easy to read to a user in the middle.

    HTML has a set syntax for creating web documents. With XML you can specify your syntax depending on what you are doing. XML is a buzzword, which marketing people drool over, but the reason it is is because it's a powerful technology for standardized representation of data.

    On another note, to say that you don't expect any more advances in web technologies is utterly rediculous... Of course there will be advances, just like every other Computer technology over the years.
  • by Genom ( 3868 ) on Thursday September 13, 2001 @12:32PM (#2292673)
    As someone already said, XML is the ultimate replacement for the comma-delimited file. For the purposes of storing human readable/modifyable data, it's great, and does fill many of the roles a comma seperated file used to fill. XML itself is pretty darned easy to pick up.

    That's not the problem.

    The problem is with the description technologies - most of which just add a layer of abstraction to the XML data, and try to pass a secondary version of the data back to an HTML template.

    That's all well and good - but quite frankly, the current incarnation of XSL stinks. It's tough to comprehend, easy to butcher, and half the time doesn't make sense.

    Much easier (and more useful, I would think) are the parsers which transform an XML document into a data structure you can use in an existing language like Perl or PHP (for the web), or C, or whatever you want. Once you're in a native data format, you're set, and can manipulate the data just as you normally would.

    That's the way to leverage the strength of XML. Ditch XSL for now, until it can be made clearer - and use some existing backend technology to format the data once it's in a data structure.

    My 2 cents, anyway =)
  • by tmoertel ( 38456 ) on Thursday September 13, 2001 @12:34PM (#2292690) Homepage Journal
    I think you misunderstand the main application of XML. It's not simply a better HTML. Rather it is a simple way to represent information richly, in a format that preserves the underlying meaning. (SGML does this, too, but is much a heavier representation.) With XML you can define document types and schemas that define the syntax of documents, and you can then associate your own semantics with the document types to capture the meaning of your information. Thus can you represent your information electronically without diluting or distorting its meaning. The "win" is that XML conforms to your information, not the other way around.

    All HTML documents, by contrast, are HTML documents. Does an H1 element represent a chapter title, a section title, a heading, or just a line of bold text separated from the rest? Who knows? The content and the presentation are mixed together in a one-size-fits-all syntax that forces you to throw away the underlying meaning of your information when you shoehorn it into HTML.

    For example, I'm working on a web site to help people affected by breast cancer. The main value of the site is the information it contains, so you can be darn sure that I'm preserving the information's meaning. I'm not using XML as a better HTML but rather as a rich medium that captures all of my information's value. Once captured, the information is easily "extruded" into HTML for web presentation, simple HTML for Palm and hand-held devices, and typeset pages in PDF for offline reading.

    Make no mistake about it, XML is already a winner.

  • XML/XSL Confusion (Score:2, Insightful)

    by Kallahar ( 227430 ) <kallahar@quickwired.com> on Thursday September 13, 2001 @12:46PM (#2292783) Homepage
    I've had trouble with the implementation side of XML. While the concept behind XML is extremely simple, getting it to display is quite another. XSL chose some extremely hard to understand syntax for a data structure designed to be human-readable.

    Travis
  • Schemas? (Score:2, Insightful)

    by Malc ( 1751 ) on Thursday September 13, 2001 @12:50PM (#2292805)
    The book review mentioned a chapter on DTDs, but what about schemas? Aren't schemas the way we're supposed to go? Without coverage of Schemas, I will stick with ageing but excellent "Professional XML" book from the Wrox Press.
  • by Brad Wilson ( 462844 ) on Thursday September 13, 2001 @12:56PM (#2292838) Homepage
    The purpose of XML is not as an HTML replacement. Those who use XML to generate HTML are doing one moderately interesting thing with some powerful technologies. But the real power of XML is that everyone is speaking the same language.

    When you see technologies like SOAP and ebXML, you really start the understand the value of this common language. Don't judge XML as an HTML replacement.

Kleeneness is next to Godelness.

Working...