Skip to Main Content
Perl and XML
book

Perl and XML

by Erik T. Ray, Jason McIntosh
April 2002
Intermediate to advanced content levelIntermediate to advanced
218 pages
6h 12m
English
O'Reilly Media, Inc.
Content preview from Perl and XML

Chapter 10. Coding Strategies

This chapter sends you off by bringing this book’s topics full circle. We return to many of the themes about XML processing in Perl that we introduced in Chapter 3, but in the context of all the detailed material that we’ve covered in the interceding chapters. Our intent is to take you on one concluding tour through the world of Perl and XML, with its strategies and its gotchas, before sending you on your way.

Perl and XML Namespaces

You‘ve seen XML namespaces used since we first mentioned this concept back in Chapter 2. Many XML applications, such as XSLT, insist that all their elements claim fealty to a certain namespace. The deciding factor here usually involves how symbiotic the application is in its usual use: does it usually work on its own, with a one-document-per-application style, or does it tend to mix with other sorts of XML?

DocBook XML, for example, is not very symbiotic. An instance of DocBook is almost always a whole XML document, defining a book or an article, and all the elements within such a document that aren’t explicitly tied to some other namespace are found in the official DocBook documentation.[1] However, within a DocBook document, you might encounter a clump of MathML elements making their home in a rather parasitic fashion, nestled in among the folds of the DocBook elements, from which it derives nourishing context.

This sort of thing is useful for two reasons: first, DocBook, while its element spread tries to cover all kinds ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Perl & LWP

Perl & LWP

Sean M. Burke
XML and Perl

XML and Perl

Mark Riehl, Ilya Sterin
Advanced Perl Programming

Advanced Perl Programming

Sriram Srinivasan
Programming Web Services with Perl

Programming Web Services with Perl

Randy J. Ray, Pavel Kulchenko

Publisher Resources

ISBN: 059600205XSupplemental ContentErrata Page