forward compatibility
diff --git a/skeletons/tests/check-OCTET_STRING.c b/skeletons/tests/check-OCTET_STRING.c
index 58da387..059d249 100644
--- a/skeletons/tests/check-OCTET_STRING.c
+++ b/skeletons/tests/check-OCTET_STRING.c
@@ -34,7 +34,7 @@
rc = decoder(0, td, (void **)&st, tagname, xmlbuf, xmllen);
printf("[%s] => [%s]:%d vs [%s]:%d, code %d\n",
xmlbuf,
- st ? st->buf : "", st ? st->size : 0,
+ st ? (const char *)st->buf : "", st ? st->size : 0,
verify ? verify : "", verlen, rc.code);
if(verify) {
@@ -68,6 +68,8 @@
check(HEX, "z", "<z><!-- <some <sometag>-->40</z>", "@");
check(HEX, "z", "<z><!-- <some <sometag-->>40</z>", 0);
+ check(HEX, "z", "ignored<z>40</z>stuff", "@");
+
check(HEX, "tag", "<tag>4</tag>", "@");
check(BINARY, "tag", "<tag/>", "");
diff --git a/skeletons/xer_decoder.c b/skeletons/xer_decoder.c
index 39e830d..96f72e9 100644
--- a/skeletons/xer_decoder.c
+++ b/skeletons/xer_decoder.c
@@ -220,11 +220,15 @@
continue;
case PXER_TEXT:
if(ctx->phase == 0) {
- /* Unexpected data */
- /* TODO: ignore whitespace? */
- RETURN(RC_FAIL);
+ /*
+ * We have to ignore whitespace here,
+ * but in order to be forward compatible
+ * with EXTENDED-XER (EMBED-VALUES, #25)
+ * any text is just ignored here.
+ */
+ } else {
+ XER_GOT_BODY(buf_ptr, ch_size);
}
- XER_GOT_BODY(buf_ptr, ch_size);
ADVANCE(ch_size);
continue;
case PXER_TAG: