[Xml-compile] Automatic (unobtrusive) handling of Base64

Michael Ludwig m.ludwig at epages.com
Tue Jan 24 17:57:20 GMT 2012


I just discovered the Base64 data type, when specified in
a schema, is handled by the library automatically.

http://search.cpan.org/~markov/XML-Compile/lib/XML/Compile/Schema/BuiltInTypes.pod#Encoding

This comes in handy when you know about it.

It is when you don't know about it that it can cause grief.
Especially when interfacing with a web service that doesn't
return error messages for errors like bad image data. (Which
is what you get when you apply Base64 encoding to an image
that is already Base64 encoded. Like when you're unaware of
type conversions being handled for you.)

So I'm just writing to bring that automatic conversion to
your attention lest you run up against the same wall as I
did. Maybe there's one or more suitable places in the docs
to alert the reader to those type conversions taking place.
Maybe here:

http://search.cpan.org/~markov/XML-Compile/lib/XML/Compile.pod#Comparison
http://search.cpan.org/~markov/XML-Compile/lib/XML/Compile/Schema/BuiltInTypes.pod#DESCRIPTION

Best,

Michael




More information about the Xml-compile mailing list