Skip to content

Commit

Permalink
Add value true for xs:boolean types
Browse files Browse the repository at this point in the history
Eventually the conformance test will complain about the use of "true"
and "false" but the XML specification for xs:boolean is also valid. So
we just handle both cases.

Fixes Github Issue #18
  • Loading branch information
fjes committed Mar 21, 2023
1 parent b0ad29c commit 94c2b01
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion esi.c
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,8 @@ static void parse_example(xmlNode *root)

static int parse_boolean(xmlChar *boolean)
{
if (xmlStrcmp(boolean, Char2xmlChar("1")) == 0)
if (xmlStrcmp(boolean, Char2xmlChar("1")) == 0 ||
xmlStrcmp(boolean, Char2xmlChar("true")) == 0)
return 1;

return 0;
Expand Down

0 comments on commit 94c2b01

Please sign in to comment.