146
Designing XML Based Applications
schema of the application's domain. (UBL is an example of the latter case.) The
developer must realize that such an approach has some limitations it is easier to
transform from a structure containing more information to one with less informa 
tion than the reverse. Therefore, the choice of the generic internal schema is key to
that approach. Code Example 4.8 shows how to use a stylesheet to transform an
external, XSD based schema to an internal, DTD based schema.
xmlns:so="http://blueprints.j2ee.sun.com/SupplierOrder"
xmlns:li="http://blueprints.j2ee.sun.com/LineItem"
xmlns:xsi="http://www.w3.org/2001/XMLSchema instance"
version="1.0">
doctype public=" //Sun Microsystems, Inc.   
J2EE Blueprints Group//DTD SupplierOrder 1.1//EN"
doctype system="/com/sun/j2ee/blueprints/
supplierpo/rsrc/schemas/SupplierOrder.dtd" />
so:SupplierOrder/so:OrderId" />
so:SupplierOrder/so:OrderDate" />
so:ShippingAddress|.//li:LineItem"/>
so:ShippingAddress">
...
li:LineItem">






New Page 1