From 0fbac7326ab3b1f0dcf912bb45b1e0be303116ea Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Wed, 18 Jun 2014 11:25:17 +0200 Subject: [PATCH] Allow elementset to be configured --- doc/filter_xquery.rnc | 4 ++++ doc/xquery.xml | 25 +++++++++++++++++++------ src/config.xml | 1 + src/metaproxy_filter_xquery.cpp | 21 ++++++++++++++++++--- 4 files changed, 42 insertions(+), 9 deletions(-) diff --git a/doc/filter_xquery.rnc b/doc/filter_xquery.rnc index 036c2ee..38554b7 100644 --- a/doc/filter_xquery.rnc +++ b/doc/filter_xquery.rnc @@ -6,6 +6,10 @@ filter_xquery = attribute type { "xquery" }, attribute id { xsd:NCName }?, attribute name { xsd:NCName }?, + element mp:elementset { + attribute name { xsd:string }, + attribute backend { xsd:string }, + }, element mp:script { attribute name { xsd:string }, }, diff --git a/doc/xquery.xml b/doc/xquery.xml index 4178ad8..fec1184 100644 --- a/doc/xquery.xml +++ b/doc/xquery.xml @@ -28,7 +28,17 @@ Configurable values: - <script name="name"> + <elementset name="name1" backend="name2"/> + + + Specifies the elementset (name1) that triggers the transform. + Note that the record syntax must be XML as well. + The 2nd element set, name2, specifies the element set that + is sent to the next filter in chain (backend). + + + + <script name="name"/> The full path of the XQuery script to be invoked. @@ -36,7 +46,7 @@ - <record name="var"> + <record name="var"/> The name of the XQUery variable where the input XML record @@ -68,11 +78,14 @@ EXAMPLES - Configuration: + Configuration for converting MARCXML to BIBFRAME. - - + + +