The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

XML::XMetaL::Factory - XMetaL factory class

SYNOPSIS

 use XML::XMetaL::Factory;
 my $factory = XML::XMetaL::Factory->new();
 my $xml_doc_1 = '...';# A serialized XML document
 my $xml_doc_2 = 'd:\documents\xml\my_doc.xml';# Path to XML file
 my $xmetal = $factory->create_xmetal($xml_doc_1, $xml_doc_2);

DESCRIPTION

XML::XMetaL::Factory is a factory class for creating XMetaL instances.

XML::XMetaL::Factory creates XMetaL instances, ensures that processing does not continue until initialization is complete, and provides XMetaL with a basic lean-up routine that will be implemented automatically when XMetaL is closed.

XML::XMetaL::Factory is meant for use by external scripts that need to instantiate an XMetaL application object. The most obvious use is by test scripts.

Using XML::XMetaL::Factory it is possible to write unit and function tests for XMetaL customization packages. This is important for more reasons than good programming style. Coupled with the capability to do object oriented development, it becomes possible to develop XMetaL applications using agile development methodologies such as Extreme Programming. You can find out more about Extreme Programming at http://www.xprogramming.com.

Public methods

Constructor and initialization

 my $factory = XML::XMetaL::Factory->new()

The constructor takes no arguments. It returns a factory object that can be used to create XMetaL application objects.

create_xmetal

 my $xmetal_application = $factory->create_xmetal(@document_list);

The create_xmetal method takes a list of scalar variables as arguments. An element in the list must either contain an XML document as a string, or a file path.

There is currently no support for filehandles, URLs, filepaths, or DOM document objects of any kind.

The create_xmetal method returns an XMetaL Application object.

Private Methods

None you want to mess with. The implementation is likely to change in future versions.

ENVIRONMENT

The Corel XMetaL XML editor must be installed.

BUGS

Currently, the XMetaL application object is created when the factory object is created. The create_xmetal method merely opens documents and returns the already existing application object.

Please send bug reports to <henrik.martensson@bostream.nu>.

SEE ALSO

See XML::XMetaL.

AUTHOR

Henrik Martensson, <henrik.martensson@bostream.nu<gt>

COPYRIGHT AND LICENSE

Copyright 2003 by Henrik Martensson

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.