Project

General

Profile

« Previous | Next » 

Revision 472

Added by berkley about 24 years ago

added package and resource data and structures

View differences:

src/loaddtd.sql
7 7
INSERT INTO xml_catalog (entry_type, public_id, system_id)
8 8
     VALUES ('DTD', '-//NCEAS//eml-variable//EN',
9 9
     'http://dev.nceas.ucsb.edu/metadata/dtd/eml-variable.dtd');
10
INSERT INTO xml_catalog (entry_type, public_id, system_id)
11
     VALUES ('DTD', '-//NCEAS//eml-variable//EN',
12
             'http://dev.nceas.ucsb.edu/metadata/dtd/package.dtd');
src/xmltables.sql
21 21
DROP SEQUENCE xml_nodes_id_seq;
22 22
DROP SEQUENCE xml_revisions_id_seq;
23 23
DROP SEQUENCE xml_catalog_id_seq;
24
DROP SEQUENCE xml_relation_id_seq;
24 25

  
25 26
DROP TRIGGER xml_revisions_before_insert;
26 27
DROP TRIGGER xml_catalog_before_insert;
28
DROP TRIGGER xml_relation_before_insert;
27 29

  
30
DROP INDEX xml_relation_index;
31

  
28 32
DROP TABLE xml_index;
29 33
DROP TABLE xml_catalog;
30 34
DROP TABLE xml_access;
......
32 36
DROP TABLE xml_documents;
33 37
DROP TABLE xml_nodes;
34 38
DROP TABLE xml_acc_numbers;
39
DROP TABLE xml_relation;
35 40

  
36 41
/* 
37 42
 * Nodes -- table to store XML Nodes (both elements and attributes)
......
188 193
	local_id	NUMBER(20),	-- second part - unique in global name
189 194
   CONSTRAINT xml_acc_numbers_pk PRIMARY KEY (global_name, local_id)
190 195
);
196

  
197
CREATE TABLE xml_relation (
198
  relationid    NUMBER(20) PRIMARY KEY,  -- unique id
199
  subject       VARCHAR2(1024) NOT NULL, -- the subject of the relation
200
  subdoctype    VARCHAR2(256),           -- the doctype of the subject
201
  relationship  VARCHAR2(512)  NOT NULL, -- the relationship type
202
  object        VARCHAR2(1024) NOT NULL, -- the object of the relation
203
  objdoctype    VARCHAR2(256)            -- the doctype of the object
204
  );
205
CREATE UNIQUE INDEX xml_relation_index
206
       ON xml_relation(relationid, subject, relationship, object);
207

  
208
CREATE SEQUENCE xml_relation_id_seq;
209
  
210
CREATE TRIGGER xml_relation_before_insert
211
BEFORE INSERT ON xml_relation FOR EACH ROW
212
BEGIN
213
  SELECT xml_relation_id_seq.nextval
214
    INTO :new.relationid
215
    FROM dual;
216
END;
217
/
218

  
src/loadstylesheets.sql
28 28
       VALUES ('XSL', 'resource', '-//W3C//HTML//EN',
29 29
                '-//NCEAS//resource.xsl',
30 30
                'http://dev.nceas.ucsb.edu/berkley/style/resource.xsl');
31
INSERT INTO xml_catalog (entry_type, source_doctype, target_doctype,
32
       public_id, system_id)
33
       VALUES ('XSL', '-//NCEAS//resource//EN', '-//W3C//HTML//EN',
34
                '-//NCEAS//resource.xsl',
35
                'http://dev.nceas.ucsb.edu/berkley/style/resource.xsl');

Also available in: Unified diff