=== version history of XML::Compile Unless noted otherwise, these changes where initiated and applied by Mark Overmeer. To be resolved: - handle XML::LibXML::Error objects - useSchema() relation to ::Cache::declare()? - proposed new schema features: . alternative http://www.ibm.com/developerworks/library/x-xml11pt2/#N103D7 . ::Instance cannot handle element and attribute declaration attribute "targetNamespace" (proposed schema feature) - namespace blocking option for templates; exclude deprecated elements - when you use appendChild i.s.o. addChild, the namespace declarators are managed automatically correct, saving a wrapper in the writer and avoiding the prefix trick. [Roman Daniel]. Nicer, but would affect the whole code and most tests. - errors on types should show dynamic nested location in structure, not path in schema. - nillable support for mixed elements version 1.29: Tue Oct 16 16:27:13 CEST 2012 Fixes: - template: fix understanding of predefined hook names. - writer: sort any and anyAttribute elements before processing them, so the elements are in predictable order (required for regression tests) Improvements: - new function ::BuiltInTypes::builtin_type_info() version 1.28: Sat Oct 6 13:38:15 CEST 2012 Changes: - template: the type of the element is listed before other info. Fixes: - major rewrite on handling of nillable. rt.cpan.org #79986 [Karen Etheridge] Improvements: - writer: support for any blocks where the type keys is not specified as '{$ns}local', but as '$prefix:local'. version 1.27: Fri Aug 31 00:26:13 CEST 2012 Fixes: - Nillable in combination with empty complexTypes. Reported by [Graeme Stewart] Improvements: - use [0-9], not \d in regexes for types. - writer: added explanation and example for complexType/singleContent use with single value, not HASH. Suggested by rt.cpan.org#79270 [Karen Etheridge] - changed implementation of XML::Compile::Schema::Namespaces autoexpand_xsi_type() version 1.26: Thu Aug 16 00:07:44 CEST 2012 Changes: - there was no way to encode or decode attributes to NILled elements. The fix implies that the reader will not return a simple "NIL" anymore for tagged and complex elements, but { _ => 'NIL' } Reported by [Ivan Šimoník] Fixes: - fix use of default in "tagged" simple. Reported by [Philip Garrett] - documentation mistake in Translate::Reader, declare typemaps with addTypemaps(), not typemap(). Reported by [Ivan Šimoník] Improvements: - template: nillable much clearer presented - added some test for use of CDATA as node text. - add $schema->template(TREE => ...) version 1.25: Fri Mar 9 21:34:36 CET 2012 Fixes: - fix compiling of simpleContent with facets. rt.cpan.org#75235 [Piers Cawley] Improvements: - better check for NCName. - warn for automatic (base64) formatting in ::BuildInTypes [Michael Ludwig] - permit base-type in list of xsi_type alternatives (although still not required in that list) - xsi_type table now can have 'AUTO' to replace the explicit alternatives list. May be slow, but it DWIMs. - when "integer" type values stay small, we do not use Math::BigInt anymore. Less need for sloppy_integer. version 1.24: Wed Dec 28 12:23:13 CET 2011 Fixes: - hexBinary should use capitals. rt.cpan.org #73130 [Piotr Roszatycki] Improvements: - doc-fix use of addHook [Michael Ludwig] - fixes to the documentation system. version 1.23: Wed Nov 23 09:44:07 CET 2011 Improvements: - writer: show more of the string in failed union match. - added 'no warnings recursion' to the translators. [Brian Phillips] - added extra tests for union of date and dateTime - template: change display of facet whitespace. - template: do not use comments in XML which contain '--' rt.cpan.org#72616 [Piotr Roszatycki] - template: add xs and xsi declarations to XML example when show_type is in effect. rt.cpan.org#72616 [Piotr Roszatycki] version 1.22: Mon Jun 20 14:25:14 CEST 2011 Fixes: - man-page of bin/schema2example told that the name of the program still was xml2example. - template: show occurance of ANY elements. - initialize XML::LibXML::Parser into safe mode. rt.cpan.org#68803 [Yann Kerherve] Improvements: - template: with restrictions on any and anyAttribute namespaces, show prefixes not full names except for the default namespace. - template: correct example of simpleType list. - template: remove superfluous element name from default/fixed/nil version 1.21: Fri Dec 24 10:20:15 CET 2010 Fixes: - some tests fail with new versions of Test::More version 1.20: Wed Dec 22 16:34:24 CET 2010 Changes: - ::Schema::compile(include_namespaces) with a personal filter will now be called for all known namespaces, not only the used namespaces. (Needed to reseolve qname problems) Fixes: - added missing formatter when both totalDigits and fractionDigits are restricted. rt.cpan.org#63464 [mimoň-cz] Improvements: - base64Binary length facet implemented with new MIME::Base64::decoded_base64_length() - disable t/55facet_list.t tests for old libxml2 versions, because the used regexp is broken in those releases, causing daily mails from cpantesters. version 1.19: Mon Oct 25 00:06:25 CEST 2010 Fixes: - template: missing '{' in some cases [Patrick Powell] - unsignedInt max value has 10 digits, not 9. Repair validation limit. rt.cpan.org#62281 [Aleksey Mashanov] - fix pod problem in ::FAQ, spotted by [Patrick Powell] - added missing built-in type dateTimeStamp. - writer: implemented/fixed length validation of base64Binary and hexBinary. - implemented/fixed enumeration validation of a QName type rt.cpan.org#62237 [Aleksey Mashanov] Improvements: - ::Instance does not look for 'ref' attributes, because that cannot be used on top-level elements and types. - ::Instance only collects info about type lazily, which speeds-up applications with huge schemas which are only partially used. In general it uses less memory. - rewrote administration of substitutionGroups to access it faster. This may change the examples produced in template. - new ::Namespaces::doesExtend() to walk inheritance, tested in t/02ext.t version 1.18: Thu Sep 30 17:00:29 CEST 2010 Fixes: - hexBinary processing was simply wrong. - template: call parameters of replace hook. - writer: substitutionGroup of simpleType value 0 got ignored. - template: recursive substitutionGroups with abstracts will not crash. - template: apply key rewrite also on unqualified names. - preferred prefix for SCHEMA2001i is xsi, not xs Improvements: - added explanation how to use hexBinary and base64Binary. - reorganized the ::Schema manpage a little. - template: show types in prefixed form, not qname. - template: show enums which contain blanks within quotes. - template: if a simpletype has facet enumeration, one of those values will be used as example. - template: always lead a block display by a blank line, not only when there is comment. - template: do also show types of complex elements. - template: show types of alternatives to substitutionGroups - template: show when an substitutionGroups is abstract (not instantiatable) - template: pick an non-abstract alternative as example for a substitionGroup. Let it point to a correct example value if available. version 1.17: Thu Sep 23 09:31:40 CEST 2010 Changes: - removed 'IGNORE' choice for abstract_types options. Either they produce and ERROR or you ACCEPT them in your message, ignoring them to be abstract. - move t/99pod.t to xt/ which removes dependency from Test::Pod Fixes: - writer: do not complain about mal-formatted integers when validation is off [Titi Ala'ilima] - reader: do not complain about mal-formed integers when validation is off. - template: do not show "TEMPLATE_ERROR" when the defaults of fields are '0'. - template: did not show extensions of abstract types. - template: fix line folding with long words. - template: remove double blanks before '[' Improvements: - template: report wrong value of action parameter before anything else. - template: show reason for empty sequences - template: do not show abstract types in substitutionGroups version 1.16: Tue Jun 15 15:16:29 CEST 2010 Fixes: - template: processing of nillable objects. rt.cpan.org#58321 [Max Cohan] - the chaching needed for recursive schemas, did not contain xsi:type logic. [Knut Arne Bjørndal] version 1.15: Mon May 10 15:20:17 CEST 2010 Fixes: - reader: namespace qualified attributes. Discovered by [Heiko Jansen] - reader: namespace of attributeGroups. - writer: namespace qualified fixed value attribute. Improvements: - remove out-dated constants from the ::BuildInTypes manual-page - ::Translate::keyRewrite accepts split ns/local as well. This avoids clumpsy pack/unpack. version 1.14: Mon Apr 26 09:39:28 CEST 2010 Fixes: - ::Template(PERL) improve key_rewrite use. - xsi:type when schema-namespace has the default prefix and the user defined elements/types are namespace-less. [Brendan Knox] - ::Writer report misfit failed due to reuse of $@ - correct validation of type "duration" by [Titi Ala'ilima] Improvements: - with xsi_type switches of simple types, the value is translated into a HASH containing that value, so the XSI_TYPE can be added. - add check for dateTime and duration validation. - ::Template(PERL) add start line '# Describing ....' - ::Template(PERL) explicit list blocked default prefix. version 1.13: Sun Feb 21 00:09:24 CET 2010 Fixes: - xsi:type switch between elements based on the same abstract type. Reported by [Roman Daniel] - template: display of fixed and default elements. [Anton Berezin] - writer: add attributes to display of available tags in case of problems. Improvements: - template: show more details about applicable facets. version 1.12: Mon Jan 11 11:46:43 CET 2010 Fixes: - writer: optional block was not optional [Roman Daniel] - accept xsi:type with alternative in namespace which is not used by the schema itself [Roman Daniel] version 1.11: Fri Jan 8 12:37:23 CET 2010 Fixes: - forgot to document the new xsi_type option to ::Schema::compile() - implement facets on lists correctly. Tests in new t/55facet_list.t Pushed by rt.cpan.org #53392 [Николай Шуляковский] version 1.10: Thu Dec 24 16:56:13 CET 2009 Changes: - keyRewrite now also applies to attributes. Fixes: - writer sometimes destroyed the data-structure which was passed in. Now automatically tested for each test_rw. - support sub-seconds in time format. - writer: do not produce an empty element when minOccurs is combined with nillable in a complexType. rt.cpan.org#51264 [Roman Daniel] - ::Iterator::currentType() could crash. Improvements: - writer: major readibility changes. - all: implemented xsi:type - template: do not produce superfluous quotes in Perl template examples when anonymous HASH of ARRAY is included. version 1.09: Fri Nov 13 10:56:45 CET 2009 Fixes: - writer: do not produce an empty element when minOccurs is combined with nillable in a simpleType rt.cpan.org#51264 [Roman Daniel] Improvements: - template: use prefixes to avoid namespaces in types. version 1.08: Sat Oct 24 20:11:10 CEST 2009 Fixes: - reader: fix last parameter of replacement hook Improvements: - template: support for key_rewrite - use the new XML::LibXML::RegExp, to replace tricky XML::RegExp. version 1.07: Mon Jun 22 11:35:22 CEST 2009 Fixes: - mixed attribute on complexContent not detected. - anyType elements which have sub-elements will not stringify, but only simple strings will get simplified. Otherwise, an XML::LibXML::Node is kept. Improvements: - reader: anyType element processing can be hooked via a new compile(any_type) option. - partial support for attribute targetNamespace on element and attribute declarations. Currently produces a warning. version 1.06: Thu May 28 10:28:45 CEST 2009 Fixes: - prefer simpleType child over base type attribute in simpleContent/restriction. rt.cpan.org#46212 [Erich Weigand] Improvements: - ignore all references to an (unloaded) schema, for instance with deprecated structures via ::compile(block_namespace) with tests in t/76blocked.t - fixed tests in t/91noqual.t - include t/75type.t in the distribution. - added test for base64Binary to t/21types.t - reader and writer: replace hook also gets code-ref able to process what is being replaced, implementing a wrapper. version 1.05: di apr 28 13:04:42 CEST 2009 Improvements: - writer: accept single element for tagged and mixed. - writer: accept scalar for mixed, upgraded to text node. version 1.04: Fri Apr 24 16:08:43 CEST 2009 Fixes: - the use of cached schema elements must be limited to single ::Schema objects (for instance per WSDL object). rt.cpan.org#44959 [Jozef Kutej] - complex extension of anyType types. Improvements: - document that key_rewrite only applies to elements, not attributes. - add 'target_namespace' overrule option to importDefinitions() and ::Schema::addSchemas() - have ::Schema::new() pass options to importDefinitions() - added various entries about fixing-up schema's to the FAQ. version 1.03: Wed Mar 25 15:41:43 CET 2009 Fixes: - template: protect output against combinatorial explosion, which did hurt [Anton Berezin] Improvements: - new option ::Schema::compile(abstract_types) - template: compact the output of substitutionGroups, leaving the abstract types out and use columns in the display. - template: add namespace details to XML and PERL output - template: add header to XML and PERL output. New option ::Schema::template(skip_header) version 1.02: Thu Feb 12 11:37:49 CET 2009 Fixes: - fix useSchema() deep recursion - writer: repair ARRAY complaint when scalar given on place where an array of values is acceptable. [Allan Wind] version 1.01: Thu Feb 12 09:39:50 CET 2009 Fixes: - do not use /bin/pwd in t/pod.t - writer: report warnings when accepting a difficult construction. - key_rewrite(PREFIXED) options now do stack, without the possibility to get it rewritten twice. - reader: complain if no data was recognized. [Jozef Kutej] - handle schema's with targetNamespace but not qualified elements. http://www.w3.org/TR/xmlschema-0/#UnqualLocals [Jozef Kutej] Improvements: - ::Schema::useSchema() let you share definitions between various ::Schema extensions. - document that XML::Compile::dataToXML() can be used as instance method as well. version 1.00: Wed Jan 21 10:51:23 CET 2009 Changes: - oops, rename elementFormDefault parameters into element_form_default. Breaks only XML::Compile::SOAP 2.00_01 - substitutionGroup keys did not get prefixed, when key_rewrite was enabled. Fixes: - writer: name-space qualified for NIL [Mark Blackman] - template: be more careful not to put trailing '}' on a line with comment. - writer: contents of tagged elements were not processed, so not checked or whitespace corrected. - report rewritten key when required value is missing, not the full key. - compile(mixed_elements=STRUCTURAL) was ignored when the mixed option was found with the complexContent. Improvements: - template: hook "COLLAPSE" to reduce output size for well-known types. - writer: accept {_ => $value} as alternative for $value. - writer: optimize seq block with one block element. - added XML::Compile::Util::even_elements() - writer: show available tags in complex block with unused tags when in debug mode. - show substitutionGroup members in debug mode. Requires Log::Report v0.21 - make addHooks() use addHook(), easier to override. - reader: elements with mixed="true" by default only unpacks the ATTRIBUTES. It is hard to figure-out why the node is not translated into Perl. Therefore, the resulting HASH now contains a _MIXED_ELEMENT_MODE key as explanation. - with "Log::Report mode => 'DEBUG'", you may get extra help on some errors. version 0.99: Mon Dec 29 10:16:28 CET 2008 Changes: - reset "used count" when include_namespaces - Qname will not complain about "unused namespace", because that is often not true. If true, than you have to provide a the compile(prefixes) as HASH with used flag set. Fixes: - elements and attributes with non-default "form" attribute were not recognized. - type-based replace hook selected too often. Improvements: - compile(include_namespaces) can have a code reference to filter included namespace declarations to be included. - addSchemas/importDefinitions now have options {element,attribute}FormDefault to overrule the (missing) info in many (old) schemas (even those of soap and wsdl). - dataToXML() also finds filenames in the SCHEMADIR, not only known namespaces. That was always intended to happen. - optimize reading of complex with zero or one component. - new reader hook after => 'NODE_TYPE' - error when schema definition contains components of other namespaces. - you now can compile types only, where the schema does not contain the definition of the element which will be produced. But I will not tell you how until the interface has settled ;-) version 0.98: Tue Dec 16 08:32:04 CET 2008 Fixes: - writer failed for choice with an element containing a false value, like "0" or ''. Reported by [Sander Hulst] - do not attempt to add namespace declarations to produced attributes in the writer. - elements with minOccurs=0/maxOccurs=unbounded and optional content failed. rt.cpan.org#41725 [Osfameron] Improvements: - easier to understand error messages in block writer. - started XML::Compile::FAQ version 0.97: Mon Nov 24 15:51:54 CET 2008 Fixes: - dataToXML() with document node will return document element. - dateTime reversed minutes/seconds. Fixed by [Allan Wind] - dateTime timezone part is optional. Fixed in docs by [Allan Wind] - count error with array of elements writer, when maxOccurs is an integer value larger than 1. An error will be produced when too many elements are provided. Improvements: - bigfloat support for xml2yaml [Slaven Rezic] version 0.96: Fri Oct 10 16:02:09 CEST 2008 Fixes: - warning condition on old libxml2 version was broken: warned too often. rt.cpan.org#39807 [Joerg Plate] - overruling "qualified" on top-level elements did not work anymore. - writer hook "replace" crashed on missing (optional) data. version 0.95: Wed Oct 1 17:38:07 CEST 2008 Fixes: - top-level elements could not be have as nillable, default, and fixed. rt.cpan.org#39215 [Tom Hukins] - do pattern match on unmodified float values. rt.cpan.org#39224 [MIROD] - automatically defined xsi when any element is nillable. You will still need to specify "include_namespaces => 1" to have the compiler add the name-space definition to the root namespace. For the moment only supports SCHEMA2001 - the applications of facets is explicitly ordered, to avoid colissions between checks in lexical space and conversions made in value-space. - accept but ignore minScale and maxScale facets (cannot be represented in Perl objects yet) - removed facet totalFracDigits, which does not exist. How did it get in? - precissionDecimal was handled as int, should be float. - positiveInteger value check broken. [Sander Hulst] - accept the 'error' base-type. Improvements: - small (<1e9) float/decimal values will not become Math::Big* - facet lists and non-lists various optimizations in reader. - pre-lexical facet whiteSpace on list does not need to be checked in writer. - handling of (+|-|)INF and NaN for precissionDecimals, floats and doubles. - adapt names of test helpers to new X::C::Tester standard. v0.03 of that module is now required. version 0.94: Tue Aug 26 10:09:05 CEST 2008 Fixes: - repair whitespace facets collapse and replace. [Allan Wind] - NMTOKEN has no blanks, but token may have them. rt.cpan.org#38675 [Allan Wind] Improvements: - show more useful features of Log::Report in ::Schema SYNOPSIS version 0.93: Mon Aug 11 21:13:22 CEST 2008 Changes: - changed order of attributes back to situation of 0.90: the base-class attributes are probably more important than the attributes of the extension. - groups with maxOccurs > 1 renamed from gr_