cornelius/kode

[kxml_compiler]Make the xs:boolean parsers more pretty

martonmiklos opened this issue · 0 comments

As of today kxml_compiler generates the following parser for xs:boolean types:

  result.setOnlyBreakOrKeepLowResponse( (element.attribute( "only_break_or_keep_low_response" ).toLower() == QStringLiteral("true")) || (element.attribute( "only_break_or_keep_low_response" ).toLower() == QStringLiteral("1") ) );

It would be more nice to introduce an ancestor class for the generated classes where the boolean attribute processing could be implemented.