1
0
Fork 0
mirror of https://github.com/geometer/FBReaderJ.git synced 2025-10-04 02:09:35 +02:00

namespace processing cleanup; 'inherit' font size

This commit is contained in:
Nikolay Pultsin 2012-05-10 20:07:04 +01:00
parent 5e68f8602f
commit 2df68ca1ee
14 changed files with 53 additions and 48 deletions

View file

@ -58,6 +58,10 @@ void FB2BookReader::characterDataHandler(const char *text, size_t len) {
}
}
bool FB2BookReader::processNamespaces() const {
return true;
}
void FB2BookReader::startElementHandler(int tag, const char **xmlattributes) {
const char *id = attributeValue(xmlattributes, "id");
if (id != 0 && tag != _BINARY) {
@ -158,8 +162,7 @@ void FB2BookReader::startElementHandler(int tag, const char **xmlattributes) {
break;
case _A:
{
const std::string hrefName = xlinkNamespace() + ":href";
const char *ref = attributeValue(xmlattributes, hrefName.c_str());
const char *ref = attributeValue(xmlattributes, myHrefPredicate);
if (ref != 0) {
if (ref[0] == '#') {
const char *type = attributeValue(xmlattributes, "type");
@ -182,8 +185,7 @@ void FB2BookReader::startElementHandler(int tag, const char **xmlattributes) {
}
case _IMAGE:
{
const std::string hrefName = xlinkNamespace() + ":href";
const char *ref = attributeValue(xmlattributes, hrefName.c_str());
const char *ref = attributeValue(xmlattributes, myHrefPredicate);
const char *vOffset = attributeValue(xmlattributes, "voffset");
char offset = (vOffset != 0) ? atoi(vOffset) : 0;
if ((ref != 0) && (*ref == '#')) {