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

NAME

PRANG::Graph::Choice - accept multiple discrete node types

SYNOPSIS

See PRANG::Graph::Meta::Element source and PRANG::Graph::Node for examples and information.

DESCRIPTION

This graph node specifies that the XML graph at this point may be one of a list of text nodes or elements, depending on the type of entries in the choices property.

If there is only one type of node allowed then the element does not have one of these objects in their graph.

ATTRIBUTES

ArrayRef[PRANG::Graph::Node] choices

This property provides the next portion of the XML Graph. Depending on the type of entry, it will accept and emit nodes of a particular type.

Entries must be one of PRANG::Graph::Element, or PRANG::Graph::Text.

HashRef[Str|Moose::Meta::TypeConstraint] type_map

This map is used for emitting. It maps from the localname of the XML node to the type which that localname is appropriate for. This map also needs to include the XML namespace, that it doesn't is currently a bug.

Str name_attr

Used when emitting; avoid type-based selection and instead retrieve the name of the XML node from this attribute.

attrName

Used when emitting; specifies the method to call to retrieve the item to be output.

SEE ALSO

PRANG::Graph::Meta::Class, PRANG::Graph::Meta::Element, PRANG::Graph::Context, PRANG::Graph::Node

Lower order PRANG::Graph::Node types:

PRANG::Graph::Element, PRANG::Graph::Text

AUTHOR AND LICENCE

Development commissioned by NZ Registry Services, and carried out by Catalyst IT - http://www.catalyst.net.nz/

Copyright 2009, 2010, NZ Registry Services. This module is licensed under the Artistic License v2.0, which permits relicensing under other Free Software licenses.