-/* $Id: xslt.c,v 1.22 2006-05-23 15:21:58 marc Exp $
+/* $Id: xslt.c,v 1.24 2006-05-24 12:56:56 marc Exp $
Copyright (C) 1995-2005
Index Data ApS
{
/* find requested schema */
if (est)
- {
+ {
if (schema->identifier && !strcmp(schema->identifier, est))
- return schema;
+ return schema;
+
if (schema->name && !strcmp(schema->name, est))
return schema;
- }
-
+ }
/* or return default schema if defined */
- if (schema->default_schema)
+ else if (schema->default_schema)
return schema;
}
if (p->staticrank >= 0)
set_param_int(params, "rank", p->staticrank, p->odr);
- /* should use default elem set here .. */ if (esn)
- set_param_str(params, "schema", esn, p->odr);
- else
- set_param_str(params, "schema", "", p->odr);
+ if (esn)
+ set_param_str(params, "schema", esn, p->odr);
+ else
+ if (schema->name)
+ set_param_str(params, "schema", schema->name, p->odr);
+ else if (schema->identifier)
+ set_param_str(params, "schema", schema->identifier, p->odr);
+ else
+ set_param_str(params, "schema", "", p->odr);
if (p->score >= 0)
set_param_int(params, "score", p->score, p->odr);