Sam Crawley
and 1 contributors


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


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


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.


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.


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


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


Development commissioned by NZ Registry Services, and carried out by Catalyst IT -

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