O'Reilly logo

Effective XML: 50 Specific Ways to Improve Your XML by Elliotte Rusty Harold

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Page Formatting

Another common use of processing instructions is in page formatting. Figuring out exactly where to break words, columns, pages, and so forth is a very difficult problem for a machine. TeX probably does a better job of this than anything else, and it still doesn't always get it right. Human intervention is normally necessary for high-quality typesetting. Processing instructions like those shown below are often used for this purpose.

<?xml version="1.0"?>
<game>
  <?begin-keep-together?>
  <date>2003-10-24</date>
  <white>Jane Smith</white>
  <black>Alice Jones</black>
  <?end-keep-together?>
  <?page-break?>
  <move>f3</move>
  <move>e5</move>
  <move>g4</move>
  <move>Qh4++</move>
</game>

I think this is reasonable in applications not related to ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required