skeleton: add stub for translating entities (#if 0'd) - xmlparser - XML parser | |
git clone git://git.codemadness.org/xmlparser | |
Log | |
Files | |
Refs | |
README | |
LICENSE | |
--- | |
commit f32a38c45da3bd764f1708600a33bd878cbe8afc | |
parent b276cff61206ddd969e3963edd886e8ee0a5ea8f | |
Author: Hiltjo Posthuma <[email protected]> | |
Date: Tue, 4 Feb 2020 22:50:16 +0100 | |
skeleton: add stub for translating entities (#if 0'd) | |
Diffstat: | |
M skeleton.c | 22 ++++++++++++++++++++++ | |
1 file changed, 22 insertions(+), 0 deletions(-) | |
--- | |
diff --git a/skeleton.c b/skeleton.c | |
@@ -12,6 +12,17 @@ void | |
xmlattrentity(XMLParser *x, const char *t, size_t tl, const char *a, size_t al, | |
const char *v, size_t vl) | |
{ | |
+#if 0 | |
+ char buf[16]; | |
+ int len; | |
+ | |
+ /* try to translate entity, else just pass as data to | |
+ * xmlattr handler. */ | |
+ if ((len = xml_entitytostr(v, buf, sizeof(buf))) > 0) | |
+ xmlattr(x, t, tl, a, al, buf, (size_t)len); | |
+ else | |
+ xmlattr(x, t, tl, a, al, v, vl); | |
+#endif | |
} | |
void | |
@@ -67,6 +78,17 @@ xmldataend(XMLParser *x) | |
void | |
xmldataentity(XMLParser *x, const char *d, size_t dl) | |
{ | |
+#if 0 | |
+ char buf[16]; | |
+ int len; | |
+ | |
+ /* try to translate entity, else just pass as data to | |
+ * xmldata handler. */ | |
+ if ((len = xml_entitytostr(d, buf, sizeof(buf))) > 0) | |
+ xmldata(x, buf, (size_t)len); | |
+ else | |
+ xmldata(x, d, dl); | |
+#endif | |
} | |
void |