NAME

Win32::Word::Declarative::Document - implements a document in the declarative Word framework.

VERSION

Version 0.01

SYNOPSIS

This defines the semantics for a Word document in a declarative framework. There are two essentially complementary modes for any such set of semantics (and note that I'm still feeling my way here): these are expressive, in which we specify a data structure that will be written later (see Win32::Word::Writer), and interpretive, in which we specify, for lack of a better description, a way to interpret an existing data structure. The interpretive mode is what matching engines (like regexes) work with - when I specify a pattern, I'm telling the engine how I expect to see a given set of data.

Interpretive mode is hard. It's exciting, though, because I hope to make it an application of my concept of the active map. That is, once I define a matching structure for a given document, I now have a data structure that reflects that document. If I change the data structure, I change the document (at least potentially). That's going to be interesting if I ever manage to get it working.

As of this writing, I'm focusing on the expressive mode, because that's today's need. But let it not be forgotten that document domains like Win32::Word::Declarative::Document will eventually contain interpretive code as well.

The document node is an event context.

There are three basic ways to use a document node. First, it can be used with or without a file name to create a new Word document. If it doesn't have a filename, it'll be "Document1" or a higher number, depending on what Word assigns to it. The second mode is to open an existing document file. And the third mode is to attach to a Word document already open in the user's Word session.

INTERNALS

defines()

Called by Class::Declarative during import, to find out what xmlapi tags this plugin claims to implement.

build_payload, go

These functions are callbacks for the declarative framework.

EVENT CONTEXT OVERRIDES

semantics()

We return the 'ms-word' semantic handler as our core semantics.

DOCUMENT-SPECIFIC FUNCTIONS

selection()

Returns the current selection of the document.

AUTHOR

Michael Roberts, <michael at vivtek.com>

BUGS

Please report any bugs or feature requests to bug-wx-definedui at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Win32-Word-Declarative. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

LICENSE AND COPYRIGHT

Copyright 2010 Michael Roberts.

This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.

See http://dev.perl.org/licenses/ for more information.