X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=src%2Fservice_xslt.c;h=e126bfb1abeb8d18a666d1584c1692f7ba14bf2b;hb=c61904671e969a32a7f9d38a523f7abaa2b371fd;hp=925d61879b6887bf1de3db2e1bca0ebee8a136d3;hpb=3caf608e5084c4bff910d2c395969069ae13f0e4;p=pazpar2-moved-to-github.git diff --git a/src/service_xslt.c b/src/service_xslt.c index 925d618..e126bfb 100644 --- a/src/service_xslt.c +++ b/src/service_xslt.c @@ -1,5 +1,5 @@ /* This file is part of Pazpar2. - Copyright (C) 2006-2011 Index Data + Copyright (C) Index Data Pazpar2 is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free @@ -30,7 +30,6 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #include #include #include -#include #include #include "service_xslt.h" @@ -42,7 +41,7 @@ struct service_xslt xsltStylesheetPtr xsp; struct service_xslt *next; }; - + xsltStylesheetPtr service_xslt_get(struct conf_service *service, const char *id) { @@ -79,7 +78,7 @@ int service_xslt_config(struct conf_service *service, xmlNode *n) if (!id) { yaz_log(YLOG_FATAL, "Missing attribute id for xslt element"); - return 0; + return -1; } while (root && root->type != XML_ELEMENT_NODE) root = root->next; @@ -94,12 +93,12 @@ int service_xslt_config(struct conf_service *service, xmlNode *n) yaz_log(YLOG_FATAL, "Multiple xslt with id=%s", id); return -1; } - + sx = nmem_malloc(service->nmem, sizeof(*sx)); sx->id = nmem_strdup(service->nmem, id); sx->next = service->xslt_list; service->xslt_list = sx; - + xsp_doc = xmlNewDoc(BAD_CAST "1.0"); xmlDocSetRootElement(xsp_doc, xmlCopyNode(root, 1)); sx->xsp = xsltParseStylesheetDoc(xsp_doc);