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

NAME

XML::XForms::Generator::Control

SYNOPSIS

 use XML::XForms::Generator;

 ## Example 1
 my $control = xforms_input( { ref => 'example' },
                             [ qq|label|,
                               {},
                               qq|Example Input:| ] );

  ## Example 2
  my $label = XML::LibXML::Element->new( "label" );

  my $control2 = xforms_input( { ref => 'example2' },
                               $label );

DESCRIPTION

The XML::LibXML DOM wrapper provided by XML::XForms::Generator module is based on convience functions for quick creation of XForms controls. These functions are named after the XForms control they create prefixed by 'xforms_'. The result of 'xforms_' convience functions is an object with all of the methods available to a standard XML::LibXML::Element along with all of the convience methods listed further down in this documentation under the METHODS section.

Each XForms control function takes a hash reference to set of name => value pairs that describe the control's attributes and set of name => value pairs that are associated with a controls child elements.

Each XForms control also takes an array of child elements to attach to control. They can be specified in one of two ways in during object creation. The first method is to build an anonymous array as an argument with the name of the child as the first element, anonymous hash of attributes as the second element, and child elements as the the rest of the anonymous array. This is demonstrated in first example above. The second method is to send an object that has XML::LibXML::Node in its ISA tree as an argument. Some XForms controls require certain child elements to exist to comply with the specification (most notably the label element). If you don't specify those elements on creation, the creation will fail with an error.

XFORMS CONTROLS

 trigger     - Generates a trigger element (button?, etc.)
 input      - Simple text entry box
 output     - Display instance data
 range      - Selection of a set of contiguous data
 secret     - "Password" entry box
 select     - Multi-selection box
 select1    - Selection box
 submit     - Submit button
 textarea   - Large text entry box
 upload     - Control for file uploads

METHODS

    See code for additional methods as I haven't found a momment to document them.

AUTHOR

D. Hageman <dhageman@dracken.com>

SEE ALSO

 XML::XForms::Generator
 XML::XForms::Generator::Action
 XML::XForms::Generator::Model
 XML::LibXML
 XML::LibXML::DOM

COPYRIGHT AND LICENSE

Copyright (c) 2002-2004 D. Hageman (Dracken Technologies).

All rights reserved.

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