When you copy elements from one XML document to another, you will likely place the element in a new place in the structure. Sometimes you will want to copy an element only (without any child elements); other times, you might want to copy an element together with any content that it has. The first type of copy is called a shallow copy, and the second type is called a deep copy.
In XSLT, a shallow copy is carried out using the xsl:copy element. Listing 11.1 shows a simple purchase order for training services.
<?xml version='1.0'?> <PurchaseOrder> <Date>2003/02/20</Date> <To>XMML Training Services</To> <From>Acme Computing</From> <Items> <Item> <StockNumber>DBI99</StockNumber> ...