diff options
author | Yorhel <git@yorhel.nl> | 2013-09-22 17:05:57 +0200 |
---|---|---|
committer | Yorhel <git@yorhel.nl> | 2013-09-22 17:05:57 +0200 |
commit | b6943c7407653fbf2ea9bf15c1476788afaf4c87 (patch) | |
tree | 076d0ea5b2b6f78eeed1620d4f927acb460d9bd5 | |
parent | db5ece903bed2ec07979d0a20d3ae751513d6ccb (diff) |
Fix parsing of XML declaration without encoding but with standalone
-rw-r--r-- | yxml-states | 2 | ||||
-rw-r--r-- | yxml.c | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/yxml-states b/yxml-states index 422524d..3fa5f76 100644 --- a/yxml-states +++ b/yxml-states @@ -82,7 +82,7 @@ leq0 'x' "ml" xmldecl0; NameStart @misc1 pi1 xmldecl0 SP xmldecl1 xmldecl1 SP xmldecl1; 'v' "ersion" ver0 xmldecl2 SP xmldecl3; '?' xmldecl7 -xmldecl3 SP xmldecl3; '?' xmldecl7; 'e' "ncoding" enc0; 's' std0 +xmldecl3 SP xmldecl3; '?' xmldecl7; 'e' "ncoding" enc0; 's' "tandalone" std0 xmldecl4 SP xmldecl5; '?' xmldecl7 xmldecl5 SP xmldecl5; '?' xmldecl7; 's' "tandalone" std0 xmldecl6 SP xmldecl6; '?' xmldecl7 @@ -912,7 +912,9 @@ yxml_ret_t yxml_parse(yxml_t *x, int _ch) { return YXML_OK; } if(ch == (unsigned char)'s') { - x->state = YXMLS_std0; + x->state = YXMLS_string; + x->nextstate = YXMLS_std0; + x->string = (unsigned char *)"tandalone"; return YXML_OK; } break; |