Database Reference
In-Depth Information
One common application of XSLT is to transform an XML document in one format into a
second XML document in another format. A company can, for example, use XSLT to transform
an XML order document in its own format into an equivalent XML order document in its cus-
tomer's format. We will be unable to discuss many of the features and functions of XSLT here.
See
www.w3.org
for more information.
XSLT is a declarative transformation language. It is declarative because you create a set
of rules that govern how the document is to be materialized instead of specifying a procedure
for materializing document elements. It is transformational because it transforms the input
document into another document.
Figure 11-48(a) shows DBP-e13-CustomerList.dtd, which is a DTD for a document that
has a list of customers, and Figure 11-48(b) shows DBP-e13-CustomerListDocument.xml,
which is an XML document that is type-valid on that DTD. The DOCTYPE statement in Figure
11-48(b) points to a file that contains the DTD shown in Figure 11-48(a). The next statement
in the XML document indicates the location of another document, called a stylesheet. Shown
Figure 11-48
an External DtD and an
Example XML Document
(a) the DBP-e13-CustomerList.dtd DtD
"[POYHUVLRQ HQFRGLQJ 87)"!
'2&7<3(&XVWRPHU/LVW6<67(0&?LQHWSXE?ZZZURRW?'%3?95*?'%3H&XVWRPHU/LVWGWG!
"[POVW\OHVKHHWW\SH WH[W[VOKUHI &?LQHWSXE?ZZZURRW?'%3?95*?'%3H&XVWRPHU/LVW6W\OH6KHHW[VO"!
&XVWRPHU/LVW
!
&XVWRPHU
!
&XVWRPHU1DPH
!
)LUVW1DPH
!
-HIIHU\
)LUVW1DPH
!
/DVW1DPH
!
-DQHV
/DVW1DPH
!
&XVWRPHU1DPH
!
$GGUHVV
!
6WUHHW
!
:(OP6W
6WUHHW
!
&LW\
!
5HQWRQ
&LW\
!
6WDWH
!
:$
6WDWH
!
=LS
!
=LS
!
$GGUHVV
!
&XVWRPHU
!
&XVWRPHU
!
&XVWRPHU1DPH
!
)LUVW1DPH
!
'DYLG
)LUVW1DPH
!
/DVW1DPH
!
6PLWK
/DVW1DPH
!
&XVWRPHU1DPH
!
$GGUHVV
!
6WUHHW
!
7XPEOHZHHG/DQH
6WUHHW
!
&LW\
!
'XUDQJR
&LW\
!
6WDWH
!
&2
6WDWH
!
=LS
!
=LS
!
$GGUHVV
!
&XVWRPHU
!
&XVWRPHU/LVW
!
(b) the DBP-e13-CustomerListDocument.xml XML Document with two Customers
Search WWH ::
Custom Search