Add documentation - man page xquery.3mp
authorAdam Dickmeiss <adam@indexdata.dk>
Wed, 18 Jun 2014 08:58:09 +0000 (10:58 +0200)
committerAdam Dickmeiss <adam@indexdata.dk>
Wed, 18 Jun 2014 08:58:09 +0000 (10:58 +0200)
doc/Makefile [new file with mode: 0644]
doc/filter_xquery.rnc [new file with mode: 0644]
doc/id.htmlhelp.xsl [new file with mode: 0644]
doc/id.man.xsl [new file with mode: 0644]
doc/xquery.xml [new file with mode: 0644]

diff --git a/doc/Makefile b/doc/Makefile
new file mode 100644 (file)
index 0000000..697a7e8
--- /dev/null
@@ -0,0 +1,33 @@
+
+.PHONY: check all
+.SUFFIXES: .3mp .xml .1
+
+XSLTPROC_COMPILE = xsltproc --xinclude -path "."
+HTML_COMPILE = $(XSLTPROC_COMPILE) id.htmlhelp.xsl
+MAN_COMPILE = $(XSLTPROC_COMPILE) id.man.xsl
+REFFILES = xquery.xml
+MANFILES=xquery.3mp
+
+XMLFILES=book.xml manref.xml
+
+all: $(MANFILES)
+
+index.html: $(XMLFILES)
+       $(HTML_COMPILE) book.xml
+
+manref.xml: $(REFFILES)
+       rm -f manref.xml
+       for i in $(REFFILES); do \
+               xsltproc stripref.xsl $$i | sed 1d >>manref.xml; \
+        done
+
+.xml.3mp:
+       $(MAN_COMPILE) $<
+
+clean:
+       rm -f *.html *.pdf manref.xml *.hhp *.hhc $(MANFILES)
+
+distclean: clean
+
+check: all
+
diff --git a/doc/filter_xquery.rnc b/doc/filter_xquery.rnc
new file mode 100644 (file)
index 0000000..036c2ee
--- /dev/null
@@ -0,0 +1,19 @@
+# Metaproxy XML config file schema
+
+namespace mp = "http://indexdata.com/metaproxy"
+
+filter_xquery =
+  attribute type { "xquery" },
+  attribute id { xsd:NCName }?,
+  attribute name { xsd:NCName }?,
+  element mp:script {
+    attribute name { xsd:string },
+  },
+  element mp:record {
+    attribute name { xsd:string },
+  },
+  element mp:variable {
+    attribute name { xsd:string },
+    attribute value { xsd:string },
+  }*
+
diff --git a/doc/id.htmlhelp.xsl b/doc/id.htmlhelp.xsl
new file mode 100644 (file)
index 0000000..c31b7ee
--- /dev/null
@@ -0,0 +1,18 @@
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+               version="1.0">
+
+<xsl:import href="http://docbook.sourceforge.net/release/xsl/current/htmlhelp/htmlhelp.xsl" />
+
+<xsl:template name="body.attributes">
+   <link rel="stylesheet" type="text/css" href="style.css"/>
+</xsl:template>
+<xsl:variable name="suppress.navigation">0</xsl:variable>
+<xsl:variable name="use.id.as.filename">1</xsl:variable>
+<xsl:variable name="generate.book.toc">1</xsl:variable>
+<xsl:variable name="toc.section.depth">3</xsl:variable>
+<xsl:variable name="generate.toc.section.depth">3</xsl:variable>
+<xsl:variable name="section.autolabel">1</xsl:variable>
+
+</xsl:stylesheet>
+
+
diff --git a/doc/id.man.xsl b/doc/id.man.xsl
new file mode 100644 (file)
index 0000000..6cea265
--- /dev/null
@@ -0,0 +1,7 @@
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+               version="1.0">
+
+<xsl:import href="http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl"/>
+</xsl:stylesheet>
+
+
diff --git a/doc/xquery.xml b/doc/xquery.xml
new file mode 100644 (file)
index 0000000..4178ad8
--- /dev/null
@@ -0,0 +1,98 @@
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.4//EN"
+    "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
+]>
+<refentry id="xquery">
+ <refentryinfo>
+  <productname>Metaproxy XQuery module</productname>
+  <info><orgname>Index Data</orgname></info>
+ </refentryinfo>
+
+ <refmeta>
+  <refentrytitle>xquery</refentrytitle>
+  <manvolnum>3mp</manvolnum>
+  <refmiscinfo class="manual">Metaproxy Module</refmiscinfo>
+ </refmeta>
+
+ <refnamediv>
+  <refname>xquery</refname>
+  <refpurpose>
+   Metaproxy Module for performing record transform using XQuery
+  </refpurpose>
+ </refnamediv>
+
+ <refsect1><title>DESCRIPTION</title>
+  <para>
+   This filter performs record transforms on XML records using
+   XQuery. The module is based on Zorba.
+  </para>
+  <para>
+   Configurable values:
+   <variablelist>
+    <varlistentry><term>&lt;script name="name"&gt;</term>
+     <listitem>
+      <para>
+       The full path of the XQuery script to be invoked.
+       This is required and should be set exactly once.
+      </para>
+     </listitem>
+    </varlistentry>
+    <varlistentry><term>&lt;record name="var"&gt;</term>
+     <listitem>
+      <para>
+       The name of the XQUery variable where the input XML record
+       is stored.
+       This is required and should be set exactly once.
+      </para>
+     </listitem>
+    </varlistentry>
+    <varlistentry><term>&lt;variable name="name" value="value"/&gt;</term>
+     <listitem>
+      <para>
+       Sets XQuery variable name to value. This is set before each
+       record is converted. This setting may be repeated to set multiple
+       variables.
+      </para>
+     </listitem>
+    </varlistentry>
+   </variablelist>
+  </para>
+ </refsect1>
+
+ <refsect1><title>SCHEMA</title>
+   <literallayout><xi:include
+                    xi:href="filter_xquery.rnc"
+                    xi:parse="text"
+                    xmlns:xi="http://www.w3.org/2001/XInclude" />
+   </literallayout>
+ </refsect1>
+
+ <refsect1><title>EXAMPLES</title>
+  <para>
+   Configuration:
+   <screen><![CDATA[
+    <filter type="session_shared">
+     <resultset ttl="10" max="3" restart="true"/>
+     <session ttl="30" max="100"/>
+    </filter>
+]]>
+   </screen>
+  </para>
+ </refsect1>
+
+ <refsect1><title>SEE ALSO</title>
+  <para>
+   <citerefentry>
+    <refentrytitle>metaproxy</refentrytitle>
+    <manvolnum>1</manvolnum>
+   </citerefentry>
+  </para>
+ </refsect1>
+
+</refentry>
+
+<!-- Keep this comment at the end of the file
+Local variables:
+mode: nxml
+nxml-child-indent: 1
+End:
+-->