X-Git-Url: http://jsfdemo.indexdata.com/?a=blobdiff_plain;f=test%2Fxslt%2Fdom1.c;h=ded19e568d7099575bde9e84ef1b3d8551aa8f49;hb=76f8077473d16bc4886ca603f56ebf2aa36e2b17;hp=b83280ea2bdc93a2deb2e1f0d215e17ce1f4c29d;hpb=97a7adeb9e5059463f039495cc01cfa448463a27;p=idzebra-moved-to-github.git diff --git a/test/xslt/dom1.c b/test/xslt/dom1.c index b83280e..ded19e5 100644 --- a/test/xslt/dom1.c +++ b/test/xslt/dom1.c @@ -68,11 +68,33 @@ void tst(int argc, char **argv) /* 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)); + + /* fetch first using dom-brief.xsl */ + YAZ_CHECK_EQ(tl_fetch_first_compare( + zh, "B", yaz_oid_recsyn_xml, + "\n" + "How to program a computer\n"), + ZEBRA_OK); + /* fetch first using dom-snippets.xsl */ + YAZ_CHECK_EQ(tl_fetch_first_compare( + zh, "snippet", yaz_oid_recsyn_xml, + "\n" + "\n" + " " + "\n" + " How to program a computer\n" + "\n" + " How to program a computer\n" + "\n"), + ZEBRA_OK); + YAZ_CHECK(tl_query(zh, "@attr 1=control 11224466", 1)); + YAZ_CHECK(tl_query_x(zh, "@attr 1=titl computer", 0, 114)); 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));