158
Designing XML Based Applications
design strategies, combined with other strategies for creating factory methods or
abstract factories (strategies for creating new objects where the instantiation of
those objects is deferred to a subclass), to uniformly manipulate documents that
conform to different schemas. The business object can invoke a factory class to
create instances of different XML document editor implementations depending on
the schema of the processed document. This is an alternate approach to applying
transformations for supporting several external schemas.
Interface
XMLDocumentEditor
+setDocument:void
+getDocument:Source
+copyDocument:void
DomainSpecificXDE
BusinessObject
Interface
+setDocument:void
+getDocument:Source
javax.xml.trans
uses
encapsulates
+process:void
+copyDocument:void
form.Source
+edit:Source
+getXXX:
DomainSpecificObject
+setXXX:void
creates, extracts/inserts
obtains/modifies
DomainSpecificObject
assigns/retrieves
Figure 4.10
Basic Design of an XML Document Editor
New Page 1