|
void | get_xpath (xmlDoc *doc, const char *namespaces, const char *expr, bool debug) |
|
bool | register_namespaces (xmlXPathContextPtr xpathCtx, const char *nsList) |
|
|
Z_NamePlusRecord * | npr |
|
std::string | score |
|
Definition at line 61 of file filter_sort.cpp.
◆ Record()
mp::filter::Sort::Record::Record |
( |
Z_NamePlusRecord * |
n, |
|
|
const char * |
namespaces, |
|
|
const char * |
expr, |
|
|
bool |
debug |
|
) |
| |
Definition at line 261 of file filter_sort.cpp.
266 if (
npr->which == Z_NamePlusRecord_databaseRecord)
268 Z_External *ext =
npr->u.databaseRecord;
270 if (ext->which == Z_External_octet &&
271 !oid_oidcmp(ext->direct_reference, yaz_oid_recsyn_xml))
273 xmlDoc *doc = xmlParseMemory(
274 (
const char *) ext->u.octet_aligned->buf,
275 ext->u.octet_aligned->len);
References get_xpath(), and npr.
◆ ~Record()
mp::filter::Sort::Record::~Record |
( |
| ) |
|
◆ get_xpath()
void mp::filter::Sort::Record::get_xpath |
( |
xmlDoc * |
doc, |
|
|
const char * |
namespaces, |
|
|
const char * |
expr, |
|
|
bool |
debug |
|
) |
| |
|
private |
Definition at line 218 of file filter_sort.cpp.
221 xmlXPathContextPtr xpathCtx = xmlXPathNewContext(doc);
225 xmlXPathObjectPtr xpathObj =
226 xmlXPathEvalExpression((
const xmlChar *) expr, xpathCtx);
229 xmlNodeSetPtr nodes = xpathObj->nodesetval;
235 for (i = 0; i < nodes->nodeNr; i++)
238 xmlNode *ptr = nodes->nodeTab[i];
239 if (ptr->type == XML_ELEMENT_NODE ||
240 ptr->type == XML_ATTRIBUTE_NODE)
242 content = mp::xml::get_text(ptr->children);
244 else if (ptr->type == XML_TEXT_NODE)
246 content = mp::xml::get_text(ptr);
248 if (content.length())
255 xmlXPathFreeObject(xpathObj);
257 xmlXPathFreeContext(xpathCtx);
static void print_xpath_nodes(xmlNodeSetPtr nodes, FILE *output)
References print_xpath_nodes().
Referenced by Record().
◆ operator<()
bool mp::filter::Sort::Record::operator< |
( |
const Record & |
rhs | ) |
const |
◆ register_namespaces()
bool mp::filter::Sort::Record::register_namespaces |
( |
xmlXPathContextPtr |
xpathCtx, |
|
|
const char * |
nsList |
|
) |
| |
|
private |
Definition at line 164 of file filter_sort.cpp.
175 nsListDup = xmlStrdup((
const xmlChar *) nsList);
190 next = (xmlChar *) xmlStrchr(next,
'=');
200 next = (xmlChar*)xmlStrchr(next,
' ');
205 if (xmlXPathRegisterNs(xpathCtx, prefix, href) != 0)
◆ RecordList
◆ npr
Z_NamePlusRecord* metaproxy_1::filter::Sort::Record::npr |
|
private |
◆ score
std::string metaproxy_1::filter::Sort::Record::score |
|
private |
The documentation for this class was generated from the following file: