untitled

(ff) #1
11.6 Multiple Source Documents 273

the ampersand character from&to&These two characters have a spe-
cial meaning in XML documents. If XSLT is being used to produce a non-
XML document, then one may want these two characters to be left alone.
To force XSLT to write left angle brackets and ampersands verbatim, use
disable-output-escapingattribute in each element where this behav-
ior is desired.

Summary


•Theformat-numberfunction allows one to specify the format of a num-
ber.

•Thexsl:outputelement tells XSLT the kind of document that is being
produced so it can format the output document appropriately.

•Thexsl:textelement is used for controlling the amount of space in the
output document and also for informing XSLT whether or not to escape
the XML special characters.

11.6 Multiple Source Documents


When the amount of source information is large, it is convenient to break up
a large file into several smaller files. There are two strategies for dealing with
such collections of files:


  1. The collection of files is a single XML document that was split into pieces
    for convenience. In this strategy, all of the pieces must form a document
    that conforms to a single DTD.

  2. The collection of files is a collection of different XML documents that are
    used for a single purpose. This strategy allows the individual files in the
    collection to use different DTDs.


Suppose that one has performed five experiments and that the data are
stored in five separate files, calledexperiment1.xmlthroughexperiment5.
xml.Theexperiment1.xmlfile might look like this:

<Experiment date="2003-09-01">
<Observation id="A23">
...
</Experiment>
Free download pdf