Merge branch 'master' of git://git.indexdata.com/pazpar2
authorJason Skomorowski <jason@indexdata.com>
Fri, 18 Sep 2009 14:41:34 +0000 (10:41 -0400)
committerJason Skomorowski <jason@indexdata.com>
Fri, 18 Sep 2009 14:41:34 +0000 (10:41 -0400)
Conflicts:
src/logic.c

1  2 
src/Makefile.am
src/logic.c
src/pazpar2.h

diff --cc src/Makefile.am
Simple merge
diff --cc src/logic.c
@@@ -366,30 -345,13 +355,30 @@@ static int prepare_map(struct session *
          {
              (*m) = nmem_malloc(se->session_nmem, sizeof(**m));
              (*m)->next = 0;
 -            if (!((*m)->stylesheet = conf_load_stylesheet(se->service->config,
 -                                                          stylesheets[i])))
 + 
 +            // XSLT
 +            if (!strcmp(&stylesheets[i][strlen(stylesheets[i])-4], ".xsl")) 
 +            {    
 +                (*m)->marcmap = NULL;
-                 if (!((*m)->stylesheet = conf_load_stylesheet(stylesheets[i])))
++                if (!((*m)->stylesheet = conf_load_stylesheet(se->service->config, stylesheets[i])))
 +                {
 +                    yaz_log(YLOG_FATAL|YLOG_ERRNO, "Unable to load stylesheet: %s",
 +                            stylesheets[i]);
 +                    return -1;
 +                }
 +            }
 +            // marcmap
 +            else if (!strcmp(&stylesheets[i][strlen(stylesheets[i])-5], ".mmap"))
              {
 -                yaz_log(YLOG_FATAL|YLOG_ERRNO, "Unable to load stylesheet: %s",
 -                        stylesheets[i]);
 -                return -1;
 +                (*m)->stylesheet = NULL;
 +              if (!((*m)->marcmap = marcmap_load(stylesheets[i], se->session_nmem)))
 +                {
 +                    yaz_log(YLOG_FATAL|YLOG_ERRNO, "Unable to load marcmap: %s",
 +                            stylesheets[i]);
 +                    return -1;
 +                }
              }
 +
              m = &(*m)->next;
          }
      }
diff --cc src/pazpar2.h
Simple merge