From: Marc Cromme Date: Wed, 29 Nov 2006 11:28:18 +0000 (+0000) Subject: added XSLT stylesheet to compute CQL-to-PQF config from Zeerex explain record X-Git-Tag: METAPROXY.1.0.8~72 X-Git-Url: http://git.indexdata.com/?a=commitdiff_plain;h=8536e938bb54e6d4165aa05163ace3ffc27e6875;p=metaproxy-moved-to-github.git added XSLT stylesheet to compute CQL-to-PQF config from Zeerex explain record --- diff --git a/xml/xslt/explain2cqlpqftxt.xsl b/xml/xslt/explain2cqlpqftxt.xsl new file mode 100644 index 0000000..07206a1 --- /dev/null +++ b/xml/xslt/explain2cqlpqftxt.xsl @@ -0,0 +1,216 @@ + + + + + + + + + + + +# Propeties file to drive org.z3950.zing.cql.CQLNode's toPQF() +# back-end and the YAZ CQL-to-PQF converter. This specifies the +# interpretation of various CQL indexes, relations, etc. in terms +# of Type-1 query attributes. +# +# This file is created from a valid ZeeRex Explain XML record using the +# XSLT transformation 'explain2cqlpqftxt.xsl' +# +# xsltproc explain2cqlpqf.xsl explain.xml + + + + + + + + + + + # Title: + + + + + + + + + + + # Set info + + + + # Default set + + set = + + + + + + + + set. + = + + + + + # Index info + + + + index. + + . + + = + + + = + + + + + + + + + + # Relation info + + + + + relation.< = 2=1 + + + + relation.le = 2=2 + + + + relation.eq = 2=3 + + + + relation.eq = 2=3 + + + + relation.exact = 2=3 + + + + relation.ge = 2=4 + + + + relation.> = 2=5 + + + + relation.<> = 2=6 + + + + relation.all = 2=3 + + + + relation.any = 2=3 + + + + + + + + # Default Relation + + relation.scr = 2=3 + + + + # RelationModifier info + + + + + relationModifier.relevant = 2=102 + + + + relationModifier.fuzzy = 2=100 + + + + relationModifier.stem = 2=101 + + + + relationModifier.phonetic = 2=100 + + + + relationModifier.phrase = 6=3 + + + + + + + + + + +# Position attributes +position.first = 3=1 6=1 +position.any = 3=3 6=1 +position.last = 3=4 6=1 +position.firstAndLast = 3=3 6=3 + +# Structure attributes may be specified for individual relations; a +# default structure attribute my be specified by the pseudo-relation +# "*", to be used whenever a relation not listed here occurs. +# +structure.exact = 4=108 +structure.all = 4=2 +structure.any = 4=2 +structure.* = 4=1 +structure.eq = 4=3 + +# Truncation attributes used to implement CQL wildcard patterns. The +# simpler forms, left, right- and both-truncation will be used for the +# simplest patterns, so that we produce PQF queries that conform more +# closely to the Bath Profile. However, when a more complex pattern +# such as "foo*bar" is used, we fall back on Z39.58-style masking. +# +truncation.right = 5=1 +truncation.left = 5=2 +truncation.both = 5=3 +truncation.none = 5=100 +truncation.z3958 = 5=104 + +# Finally, any additional attributes that should always be included +# with each term can be specified in the "always" property. +# +# always = 6=1 +# 6=1: completeness = incomplete subfield + + + + +