source: ISOcat/trunk/mod-ISOcat-access-data/access/dc_pid2id.acc @ 2029

Last change on this file since 2029 was 2029, checked in by mwindhouwer, 12 years ago

Initial import of all the *cats, i.e., ISOcat, RELcat and SCHEMAcat.

File size: 1.4 KB
Line 
1<accessor debug="false">
2        <name>ISOcat.access.data.dc.pid2id</name>
3        <descr>Get the id of a DC based on its PID.</descr>
4        <param mandatory="true">
5                <name>pid</name>
6                <descr>the DC PID</descr>
7                <type canonical="true">string</type>
8        </param>
9        <idoc>
10                <seq>
11                        <instr>
12                                <type>sloot.xquery</type>
13                                <operator>
14                                        <xquery>
15                                                declare variable $pid as node() external;
16                                               
17                                                &lt;sql>
18                                                        SELECT
19                                                                id
20                                                        FROM
21                                                                core_data_category
22                                                        WHERE
23                                                                pid = '{string($pid)}'
24                                                        ;
25                                                &lt;/sql>
26                                        </xquery>
27                                </operator>
28                                <pid>var:pid</pid>
29                                <target>var:sql</target>
30                        </instr>
31                        <accessor-debug>
32                                <instr>
33                                        <type>copy</type>
34                                        <operand>var:sql</operand>
35                                        <target>ffcpl:/trace/dc_pid2id.sql.xml</target>
36                                </instr>
37                        </accessor-debug>
38                        <instr>
39                                <type>sqlQuery</type>
40                                <operand>var:sql</operand>
41                                <target>var:result</target>
42                        </instr>
43                        <instr>
44                                <type>sloot.xpath2eval</type>
45                                <operand>var:result</operand>
46                                <operator>
47                                        <xpath>(/results/row/id)[1]</xpath>
48                                </operator>
49                                <param>
50                                        <return>
51                                                <canonical/>
52                                                <string/>
53                                        </return>
54                                </param>
55                                <target>this:response</target>
56                        </instr>
57                </seq>
58        </idoc>
59        <exception>
60                <debug/>
61                <trace>ffcpl:/trace/dc_pid2id.exception.xml</trace>
62                <response>
63                        <string/>
64                </response>
65        </exception>
66        <response>
67                <debug>ffcpl:/trace/dc_pid2id.response.xml</debug>
68                <mime>application/xml</mime>
69        </response>
70</accessor>
Note: See TracBrowser for help on using the repository browser.