[xml-compile] namespace prefixes

Mark Overmeer mark at overmeer.net
Thu Sep 30 22:32:57 GMT 2010


* Mark Overmeer (mark at overmeer.net) [101001 00:22]:
> > http://code.google.com/p/perl-xml-iodef/source/browse/trunk/example.pl

You could also add an worked-out example to the distribution. That
will show the possibilities of the HASH far more readible than
Data::Dumper.

   print $schema->template(PERL => $type);

The result is quite large, but even better understandable than the schema.
Even though this is one of the cleanest schemas I have encountered.
Use the XML::Compile version I released today for the nicest result.


Another hint: this schema does not use '-' a lot in names (only a few
attributes which start with 'ext-'), however those bastards make life
hard: those HASH keys must get quoted, where others do not need it.
When you use
   $s->compile(  .... , key_rewrite => 'UNDERSCORES');
those dashes get replaced by underscores. Much easier. (Pass the same
options to the template() call.


Will your module have an "in()" method as well?
-- 
Regards,
               MarkOv

------------------------------------------------------------------------
       Mark Overmeer MSc                                MARKOV Solutions
       Mark at Overmeer.net                          solutions at overmeer.net
http://Mark.Overmeer.net                   http://solutions.overmeer.net




More information about the Xml-compile mailing list