Chapter 13

“Gimme Some Space” and Other Output Issues

In This Chapter

bullet Working with whitespace

bullet Creating more readable documents through indenting

bullet Adding XML comments to your result document

bullet Creating processing instructions

B ecause the whole purpose of XSLT is to generate new documents from other documents, the transformation language ought to have considerable flexibility in determining what the resulting document structure looks like. After all, if not, why use it? Fortunately, XSLT does have several ways to tweak the result of your transformation. In Chapter 9, I explain how you can sort and number the content. In this chapter, I discuss some of the more advanced issues concerning XSLT output.

Gimme Some Space

Whitespace is a term used to describe those invisible characters inside a document. You know, all those characters that you never see, but you know they’re there, such as spaces, tabs, carriage returns, and line feeds. They’re kind of like those creepy microscopic creatures you see on PBS specials that supposedly crawl all over you and me. Yuck! I’m itching all over just ...

Get XSLT for Dummies now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.