1
|
<!--
|
2
|
* pathquery.dtd
|
3
|
*
|
4
|
* Authors: Matt Jones
|
5
|
* Organization: National Center for Ecological Analysis and Synthesis
|
6
|
* Copyright: 2000 Regents of the University of California and the
|
7
|
* National Center for Ecological Analysis and Synthesis
|
8
|
* For Details: http://www.nceas.ucsb.edu/
|
9
|
* Created: 13 June 2000
|
10
|
* File Info: '$Id: pathquery.dtd 2562 2005-09-07 20:13:18Z sgarg $'
|
11
|
*
|
12
|
* This DTD describes the structure and content of XML documents used
|
13
|
* to represent, store, and exchange a simple path-based query expression.
|
14
|
* This syntax represents a small subset of the capabilities of the XPath
|
15
|
* language (http://www.w3.org/TR/xpath), and is intended as a simple
|
16
|
* query language for the metadata catalog database (mcdb). It is
|
17
|
* intended that all expressions in this language can be mapped directly
|
18
|
* into XPath syntax, but not all Xpath expressions can be mapped into this
|
19
|
* syntax.
|
20
|
*
|
21
|
* Although ideally we would implement the query language as either the full
|
22
|
* XPath language or as one of the emerging XML query languages (like
|
23
|
* XML-QL or XQL), in practice this would be an involved undertaking that
|
24
|
* doesn't necessarily have high payoffs. But we will revisit this issue and
|
25
|
* determine later whether these full-featured technologies are warranted
|
26
|
* after we have some experience with a simpler implementation such as this.
|
27
|
-->
|
28
|
|
29
|
<!-- Overall query container -->
|
30
|
<!ELEMENT pathquery (meta_file_id*, querytitle*, returndoctype*,
|
31
|
filterdoctype*, returnfield*,
|
32
|
owner*, querygroup)>
|
33
|
|
34
|
<!-- The version of this query specification -->
|
35
|
<!ATTLIST pathquery version CDATA #FIXED "1.3">
|
36
|
|
37
|
<!-- a unique identifier for this query document -->
|
38
|
<!ELEMENT meta_file_id (#PCDATA)>
|
39
|
|
40
|
<!-- a descriptive title for this query document -->
|
41
|
<!ELEMENT querytitle (#PCDATA)>
|
42
|
|
43
|
<!-- optional doctype returned spec - only documents with this type returned -->
|
44
|
<!-- hits are looked up using package links to this doctype -->
|
45
|
<!ELEMENT returndoctype (#PCDATA)>
|
46
|
|
47
|
<!-- optional doctype filter - only documents with this type are searched -->
|
48
|
<!ELEMENT filterdoctype (#PCDATA)>
|
49
|
|
50
|
<!-- optional name of an xml node to be returned in the resultset -->
|
51
|
<!ELEMENT returnfield (#PCDATA)>
|
52
|
|
53
|
<!-- optional name of the owner of the documents to be returned -->
|
54
|
<!-- multiple owner fields are ORed together in the query -->
|
55
|
<!ELEMENT owner (#PCDATA)>
|
56
|
|
57
|
<!-- A group of related query terms -->
|
58
|
<!ELEMENT querygroup ( (queryterm|querygroup)+ )>
|
59
|
|
60
|
<!-- the boolean expression used to combine the query terms in this group -->
|
61
|
<!ATTLIST querygroup operator (INTERSECT|UNION) #REQUIRED>
|
62
|
|
63
|
<!-- a query term is the atomic unit of a query that can be translated
|
64
|
to a single SELECT statement -->
|
65
|
<!ELEMENT queryterm (value, pathexpr?)>
|
66
|
|
67
|
<!-- a boolean flag indicating whether matches should be case-sensitive or
|
68
|
case-independent for this queryterm, one of: true|false
|
69
|
and searchmode is the type of match to perform against the text value -->
|
70
|
<!ATTLIST queryterm casesensitive (true|false) #REQUIRED
|
71
|
searchmode
|
72
|
(contains|starts-with|ends-with|equals|isnot-equal|greater-than|less-than|
|
73
|
greater-than-equals|less-than-equals) #REQUIRED>
|
74
|
|
75
|
<!-- the text value for which we are searching -->
|
76
|
<!ELEMENT value (#PCDATA)>
|
77
|
|
78
|
<!-- the path to the TEXT node used to constrain the query -->
|
79
|
<!ELEMENT pathexpr (#PCDATA)>
|
80
|
|
81
|
<!-- End of file -->
|