This POD file documents a summary of the changes in PRANG. For the full list of changes, refer to the git history.
Fixed a bug that allows PRANG to work with newer Moose versions
Increased the minimum required version of Moose.
If PRANG is marshalling out a value and it finds an XML::LibXML::Element there, it will now happily just throw the document fragment into the document being exported. Of course, you probably had to try quite hard to do that...
Not setting 'required' or 'default' on complex element attributes (ie, attributes which contain another node), and which are explicitly or implicitly required - using xml_min, xml_required, etc - is now considered a declaration error and produces a warning.
xml_min
xml_required
Removed dependency on MooseX::Method::Signatures, and replaced it with MooseX::Params::Validate
Added a 'lax' parsing mode, which ignores any extra attributes or elements which aren't defined in your class.
Allow PRANG classes to define the encoding of the XML document emitted.
Ignore xsi:schemaLocation; it has no useful meaning.
xsi:schemaLocation describes "hints as to the physical location of schema documents which may be used for ‘assessment’" - ie, it is a hint to a local validator as to which schema file contains the XML Schema definition. On XML documents which are transmitted, it is somewhere between a potential security risk and totally worthless. See http://www.w3.org/TR/xmlschema-1/#schema-loc for the full story.
Fixed a bug in PRANG::Graph::Meta::Element which sorted the classes badly when using inheritance. There is still a design issue to be solved, if you want to use inheritance and not put new elements on the end of the sequence, or if you want to use roles.
PRANG now happily ignores XML Schema instance schemaLocation and noNamespaceSchemaLocation attributes on incoming documents. They are only hints for running unconfigured XML Schema validators anyway.
schemaLocation
noNamespaceSchemaLocation
Fix enum support [reported by Heiko Jansen]
Add support for libxml indenting on to_xml [Heiko Jansen]
Specifying xml_min => 0 on an element attribute is now equivalent to xml_required => 0 [Sam Vilain]
xml_min => 0
xml_required => 0
New module PRANG::Coerce for creating coercion rules which are convenient for typical PRANG applications [Andy Chilton]
Support YourXML::Language->parse_file and ->parse_fh for convenience's sake [Sam Vilain]
YourXML::Language->parse_file
->parse_fh
No changes, just a re-bundling, as an included module was not the release version.
Distribution now includes all the modules required only for the tests. This, along with a bugfix in Scriptalicious, should hopefully close the last of the CPAN testers failures for 0.07.
An addition to PRANG::XMLSchema::Types Str subtypes: date, time, and tightening of the dateTime (it was not anchored before, so accepted any string containing a dateTime).
date
time
dateTime
New documentation PRANG::XMLSchema::Guide which provides information on manually converting XML Schema specifications to PRANG classes.
Add a coerce rule for PRANG::XMLSchema::token types which normalizes whitespace on input values if enabled.
PRANG::XMLSchema::token
The xmlns Class property now affects all sub-properties, but not the including element. This mirrors the default behaviour with XML Schema.
xmlns
Correct the handling of attributes with no prefix. They should always be considered to have no namespace, even if a default xmlns is defined, apparently.
XML namespaces support is now much more complete; lots of cases, including wildcarding of both the node name and the XML namespace now work. This is powerful enough to successfully round-trip crazy XML Schema specifications such as <any namespace="##any" processContents="skip"/>
<any namespace="##any" processContents="skip"/>
PRANG::Graph::Class has been deprecated / ripped out. It was a hang-over from the time before use PRANG::Graph; set up the metaclass trait.
use PRANG::Graph;
It is no longer required to specify the xmlns method, if you do not wish to use namespaces.
Specifying a role as a type now works, so long as the role is used by only PRANG::Graph types.
Much enhanced support for XML namespaces. Tests and functionality added; still lacking is the "Whatever" mapping, required for crazy XMLSchema stuff like >any namespace="##any" processContents="skip"/< - this will be supported in the next release.
>any namespace="##any" processContents="skip"/<
Various bug fixes, more rejection of invalid input, and so on.
Some error message enhancements for from various forms of API misunderstanding.
more missing dependencies added.
Back-port to work on pre-1.70 XML::LibXML
some missing dependencies added.
PRANG
Copyright 2010, NZ Registry Services. This documentation is licensed under the Artistic License v2.0, which permits relicensing under other Free Software licenses.
1 POD Error
The following errors were encountered while parsing the POD:
Non-ASCII character seen before =encoding in '‘assessment’"'. Assuming UTF-8
To install PRANG, copy and paste the appropriate command in to your terminal.
cpanm
cpanm PRANG
CPAN shell
perl -MCPAN -e shell install PRANG
For more information on module installation, please visit the detailed CPAN module installation guide.