13.07.2015 Views

Java™ Application Development on Linux - Dator

Java™ Application Development on Linux - Dator

Java™ Application Development on Linux - Dator

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

222Chapter 9Ant: An Introducti<strong>on</strong>Sample XML tagged dataIf you have an empty element, <strong>on</strong>e that that either does not or cannot havedata between its start tag and end tag, you may “combine” the start and endtag by putting the slash at the end of the tag:Obviously, there is more to it than this, but it is enough to begin with.XML’s uses range from publishing to networked interprocess communicati<strong>on</strong>s.Our interest here is in using it to represent a model of a piece of softwareand the various ways that software might be built and deployed. So from here<strong>on</strong>, we will be discussing not XML in general, but the ant document type. Actually,ant’s markup language uses unvalidated XML. In other words, thereisn’t officially a schema for ant. Thus, the <strong>on</strong>ly formal definiti<strong>on</strong> for an antXML file is what ant accepts and understands. This is more comm<strong>on</strong> than itshould be. Any XML markup vocabulary really should have a schema, but oftenXML use starts with “Oh, this is just a quick thing. No <strong>on</strong>e will ever read orwrite this markup. Just these two programs of mine.” These famous last wordswill <strong>on</strong>e day be right up there with “I <strong>on</strong>ly changed <strong>on</strong>e line of code!” Asstr<strong>on</strong>gly as we feel about this, ant really can never have a DTD, at least not acomplete <strong>on</strong>e. The custom task feature makes this impossible.9.4.2 The Buildfile TagsThe buildfile (usually named build.xml) begins with a header announcingthat this is an XML document and specifying what versi<strong>on</strong> of XML is beingused in it:The delimiters mark up an XML statement (as opposed to anXML tag). 6 In this case, we are declaring that this is an XML document andthat it is using XML versi<strong>on</strong> 1.0.6. Note that these are the terms we are using to describe XML to a new user. They are not theformal terms for these document elements. For the proper names, c<strong>on</strong>sult an XML reference.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!