- q("@attr 1=/record/nested before",0);
- q("@attr 1=/record/nested early",1);
- q("@attr 1=/record/nested middle",1);
- q("@attr 1=/record/nested late",1);
- q("@attr 1=/record/nested after",0);
-
- q("@attr 1=/record/nested/nested before",0);
- q("@attr 1=/record/nested/nested early",0);
- q("@attr 1=/record/nested/nested middle",1);
- q("@attr 1=/record/nested/nested late",0);
- q("@attr 1=/record/nested/nested after",0);
-
- q("@attr 1=/record/nestattr[@level='outer'] before",0);
- q("@attr 1=/record/nestattr[@level='outer'] early",1);
- q("@attr 1=/record/nestattr[@level='outer'] middle",1);
- q("@attr 1=/record/nestattr[@level='outer'] late",1);
- q("@attr 1=/record/nestattr[@level='outer'] after",0);
-
- q("@attr 1=/record/nestattr[@level='inner'] before",0);
- q("@attr 1=/record/nestattr[@level='inner'] early",0);
- q("@attr 1=/record/nestattr[@level='inner'] middle",0);
- q("@attr 1=/record/nestattr[@level='inner'] late",0);
- q("@attr 1=/record/nestattr[@level='inner'] after",0);
-
- q("@attr 1=/record/nestattr/nestattr[@level='inner'] before",0);
- q("@attr 1=/record/nestattr/nestattr[@level='inner'] early",0);
- q("@attr 1=/record/nestattr/nestattr[@level='inner'] middle",1);
- q("@attr 1=/record/nestattr/nestattr[@level='inner'] late",0);
- q("@attr 1=/record/nestattr/nestattr[@level='inner'] after",0);
-
- return close_down(zh, zs, 0);
+ YAZ_CHECK(tl_query(zh, "@attr 1=/record/nested before",0));
+ YAZ_CHECK(tl_query(zh, "@attr 1=/record/nested early",1));
+ YAZ_CHECK(tl_query(zh, "@attr 1=/record/nested middle",1));
+ YAZ_CHECK(tl_query(zh, "@attr 1=/record/nested late",1));
+ YAZ_CHECK(tl_query(zh, "@attr 1=/record/nested after",0));
+
+ YAZ_CHECK(tl_query(zh, "@attr 1=/record/nested/nested before",0));
+ YAZ_CHECK(tl_query(zh, "@attr 1=/record/nested/nested early",0));
+ YAZ_CHECK(tl_query(zh, "@attr 1=/record/nested/nested middle",1));
+ YAZ_CHECK(tl_query(zh, "@attr 1=/record/nested/nested late",0));
+ YAZ_CHECK(tl_query(zh, "@attr 1=/record/nested/nested after",0));
+
+ YAZ_CHECK(tl_query(zh, "@attr 1=/record/nestattr[@level='outer'] before",0));
+ YAZ_CHECK(tl_query(zh, "@attr 1=/record/nestattr[@level='outer'] early",1));
+ YAZ_CHECK(tl_query(zh, "@attr 1=/record/nestattr[@level='outer'] middle",1));
+ YAZ_CHECK(tl_query(zh, "@attr 1=/record/nestattr[@level='outer'] late",1));
+ YAZ_CHECK(tl_query(zh, "@attr 1=/record/nestattr[@level='outer'] after",0));
+
+ YAZ_CHECK(tl_query(zh, "@attr 1=/record/nestattr[@level='inner'] before",0));
+ YAZ_CHECK(tl_query(zh, "@attr 1=/record/nestattr[@level='inner'] early",0));
+ YAZ_CHECK(tl_query(zh, "@attr 1=/record/nestattr[@level='inner'] middle",0));
+ YAZ_CHECK(tl_query(zh, "@attr 1=/record/nestattr[@level='inner'] late",0));
+ YAZ_CHECK(tl_query(zh, "@attr 1=/record/nestattr[@level='inner'] after",0));
+
+ YAZ_CHECK(tl_query(zh, "@attr 1=/record/nestattr/nestattr[@level='inner'] before",0));
+ YAZ_CHECK(tl_query(zh, "@attr 1=/record/nestattr/nestattr[@level='inner'] early",0));
+ YAZ_CHECK(tl_query(zh, "@attr 1=/record/nestattr/nestattr[@level='inner'] middle",1));
+ YAZ_CHECK(tl_query(zh, "@attr 1=/record/nestattr/nestattr[@level='inner'] late",0));
+ YAZ_CHECK(tl_query(zh, "@attr 1=/record/nestattr/nestattr[@level='inner'] after",0));
+
+ YAZ_CHECK(tl_close_down(zh, zs));