Changeset View
Changeset View
Standalone View
Standalone View
src/extractors/dublincoreextractor.cpp
Show All 34 Lines | |||||
35 | { | 35 | { | ||
36 | QDomElement e = fragment.firstChildElement(); | 36 | QDomElement e = fragment.firstChildElement(); | ||
37 | 37 | | |||
38 | while (!e.isNull()) { | 38 | while (!e.isNull()) { | ||
39 | const QString namespaceURI = e.namespaceURI(); | 39 | const QString namespaceURI = e.namespaceURI(); | ||
40 | const QString localName = e.localName(); | 40 | const QString localName = e.localName(); | ||
41 | 41 | | |||
42 | // Dublin Core | 42 | // Dublin Core | ||
43 | // According to http://dublincore.org/documents/dces/, the | 43 | // According to | ||
44 | // properties should be treated the same regardless if | 44 | // https://www.dublincore.org/specifications/dublin-core/dces/, | ||
45 | // the properties should be treated the same regardless if | ||||
45 | // used in the legacy DCES or DCMI-TERMS variant | 46 | // used in the legacy DCES or DCMI-TERMS variant | ||
46 | if (namespaceURI == dcNS() || namespaceURI == dctermsNS()) { | 47 | if (namespaceURI == dcNS() || namespaceURI == dctermsNS()) { | ||
47 | if (localName == QLatin1String("description")) { | 48 | if (localName == QLatin1String("description")) { | ||
48 | result->add(Property::Description, e.text()); | 49 | result->add(Property::Description, e.text()); | ||
49 | } else if (localName == QLatin1String("subject")) { | 50 | } else if (localName == QLatin1String("subject")) { | ||
50 | result->add(Property::Subject, e.text()); | 51 | result->add(Property::Subject, e.text()); | ||
51 | } else if (localName == QLatin1String("title")) { | 52 | } else if (localName == QLatin1String("title")) { | ||
52 | result->add(Property::Title, e.text()); | 53 | result->add(Property::Title, e.text()); | ||
Show All 11 Lines |