X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=test%2Fxslt%2Fdom1.c;h=236d1c5dbdf478bf5b003cf39d28b0831d564486;hb=3a0123c57a12b743568263fcaf73246d05af2482;hp=efa7edc7d06eeacd88f7a38d3f73ed04184ce4d1;hpb=97dc097858772a66c8e90e8b07f77c9c20450131;p=idzebra-moved-to-github.git diff --git a/test/xslt/dom1.c b/test/xslt/dom1.c index efa7edc..236d1c5 100644 --- a/test/xslt/dom1.c +++ b/test/xslt/dom1.c @@ -1,4 +1,4 @@ -/* $Id: dom1.c,v 1.1 2007-02-07 12:08:54 adam Exp $ +/* $Id: dom1.c,v 1.2 2007-03-05 13:02:11 marc Exp $ Copyright (C) 1995-2007 Index Data ApS @@ -61,6 +61,7 @@ void tst(int argc, char **argv) zh = index_some(zs, "dom.bad.xml", "marc-col.xml"); zebra_close(zh); + /* testing XMLREADER input with PI stylesheet */ zh = index_some(zs, "dom.dom-config-col.xml", "marc-col.xml"); YAZ_CHECK(tl_query(zh, "@attr 1=title computer", 3)); YAZ_CHECK(tl_query(zh, "@attr 1=control 11224466", 1)); @@ -68,6 +69,7 @@ void tst(int argc, char **argv) YAZ_CHECK(tl_query_x(zh, "@attr 1=4 computer", 0, 121)); zebra_close(zh); + /* testing XMLREADER input with ELEMENT stylesheet */ zh = index_some(zs, "dom.dom-config-one.xml", "marc-one.xml"); YAZ_CHECK(tl_query(zh, "@attr 1=title computer", 1)); YAZ_CHECK(tl_query(zh, "@attr 1=control 11224466", 1)); @@ -75,6 +77,7 @@ void tst(int argc, char **argv) YAZ_CHECK(tl_query_x(zh, "@attr 1=4 computer", 0, 121)); zebra_close(zh); + /* testing MARC input with ELEMENT stylesheet */ zh = index_some(zs, "dom.dom-config-marc.xml", "marc-col.mrc"); YAZ_CHECK(tl_query(zh, "@attr 1=title computer", 3)); YAZ_CHECK(tl_query(zh, "@attr 1=control 11224466", 1)); @@ -82,6 +85,16 @@ void tst(int argc, char **argv) YAZ_CHECK(tl_query_x(zh, "@attr 1=4 computer", 0, 121)); zebra_close(zh); + /* testing XMLREADER input with ELEMENT stylesheet and skipped records */ + zh = index_some(zs, "dom.dom-config-skipped.xml", "marc-col.xml"); + YAZ_CHECK(tl_query(zh, "@attr 1=title computer", 1)); + YAZ_CHECK(tl_query(zh, "@attr 1=control 11224466", 0)); + YAZ_CHECK(tl_query(zh, "@attr 1=control 11224467", 1)); + YAZ_CHECK(tl_query(zh, "@attr 1=control 73090924", 0)); + + zebra_close(zh); + + YAZ_CHECK(tl_close_down(0, zs)); }