Rem Rem $Header: rdbms/admin/catxdbst.sql /main/22 2009/04/06 20:28:13 badeoti Exp $ Rem Rem catxdbstd.sql Rem Rem Copyright (c) 2001, 2009, Oracle and/or its affiliates. Rem All rights reserved. Rem Rem NAME Rem catxdbstd.sql - Rem Rem DESCRIPTION Rem Rem Rem NOTES Rem Rem Rem MODIFIED (MM/DD/YY) Rem badeoti 03/20/09 - remove public synonyms for XDB internal packages Rem spetride 10/22/08 - add app users and groups virtual folders Rem rmurthy 01/17/05 - add path for symbolic links Rem rmurthy 01/10/05 - add link type Rem bkhaladk 04/24/06 - add clob version of xmltr.xsd Rem thbaby 08/30/05 - add version virtual folder Rem thbaby 04/21/05 - Rem pnath 12/01/04 - prvtxdb.sql needs prvtxmld.sql to be compiled Rem rmurthy 10/29/03 - enable asm folder Rem rmurthy 08/28/03 - uncomment oid folder Rem sichandr 04/06/03 - add folder listing schema Rem spannala 12/19/02 - fixing bug#2702653 Rem rmurthy 01/13/03 - create OSM virtual folder Rem rmurthy 10/07/02 - create system virtual folders Rem rmurthy 03/26/02 - add XML Namespace schema Rem rmurthy 12/28/01 - set elementForm to qualified Rem rmurthy 12/17/01 - TEMP: change dateTime to date Rem rmurthy 12/17/01 - fix schemas Rem spannala 12/27/01 - xdb setup should run as sys Rem tsingh 11/26/01 - use .plb for prvtxmld, prvtxmlp, prvtxslp Rem nagarwal 11/05/01 - correct names for path view Rem nagarwal 10/31/01 - move path view schema def into standard Rem sidicula 10/02/01 - XDB Logging Rem nmontoya 08/30/01 - ADD pl/sql dom, xml parser, AND xsl processor Rem rmurthy 09/03/01 - change XDB namespace Rem esedlar 08/13/01 - Merged esedlar_http Rem esedlar 08/09/01 - Created Rem declare STDURL VARCHAR2(2000) := 'http://xmlns.oracle.com/xdb/XDBStandard.xsd'; XLURL VARCHAR2(2000) := 'http://xmlns.oracle.com/xdb/log/xdblog.xsd'; FLURL VARCHAR2(2000) := 'http://xmlns.oracle.com/xdb/log/ftplog.xsd'; HLURL VARCHAR2(2000) := 'http://xmlns.oracle.com/xdb/log/httplog.xsd'; STDXSD VARCHAR2(4000) := ' '; XLXSD VARCHAR2(4000) := ' '; FLXSD VARCHAR2(4000) := ' '; HLXSD VARCHAR2(4000) := ' '; begin xdb.dbms_xmlschema.registerSchema(STDURL, STDXSD, FALSE, TRUE, FALSE, TRUE, FALSE, 'XDB'); xdb.dbms_xmlschema.registerSchema(XLURL, XLXSD, FALSE, TRUE, FALSE, TRUE, FALSE, 'XDB'); xdb.dbms_xmlschema.registerSchema(FLURL, FLXSD, FALSE, TRUE, FALSE, TRUE, FALSE, 'XDB'); xdb.dbms_xmlschema.registerSchema(HLURL, HLXSD, FALSE, TRUE, FALSE, TRUE, FALSE, 'XDB'); end; / Rem Register XML Namespace schema declare XMLNSXSD VARCHAR2(31000) := ' See http://www.w3.org/XML/1998/namespace.html and http://www.w3.org/TR/REC-xml for information about this namespace. This schema defines attributes and an attribute group suitable for use by schemas wishing to allow xml:base, xml:lang or xml:space attributes on elements they define. To enable this, such a schema must import this schema for the XML namespace. import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="http://www.w3.org/2001/xml.xsd" Subsequently, qualified reference to any of the attributes or the group defined below will have the desired effect. In due course, we should install the relevant ISO 2- and 3-letter codes as the enumerated possible values... See http://www.w3.org/TR/xmlbase/ for information about this attribute. '; XMLNSURL VARCHAR2(2000) := 'http://www.w3.org/2001/xml.xsd'; begin xdb.dbms_xmlschema.registerSchema(XMLNSURL, XMLNSXSD, FALSE, TRUE, FALSE, TRUE, FALSE, 'XDB'); end; / declare TRXSD BFILE := dbms_metadata_hack.get_bfile('xmltr.xsd.11.0'); TRURL VARCHAR2(2000) := 'http://xmlns.oracle.com/xdb/xmltr.xsd'; begin xdb.dbms_xmlschema.registerSchema(TRURL, TRXSD, FALSE, FALSE, FALSE, FALSE, FALSE, 'XDB'); end; / -- create OID virtual folder declare ret boolean; begin ret := xdb.dbms_xdbutil_int.createSystemVirtualFolder('/sys/oid'); if ret then dbms_xdb.setacl('/sys/oid', '/sys/acls/bootstrap_acl.xml'); end if; end; / commit; -- Create the folder /sys/apps DECLARE retval BOOLEAN; BEGIN retval := DBMS_XDB.CREATEFOLDER('/sys/apps'); IF retval THEN DBMS_XDB.SETACL('/sys/apps', '/sys/acls/bootstrap_acl.xml'); END IF; END; / commit; Rem create ASM virtual folder declare ret boolean; begin ret := xdb.dbms_xdbutil_int.createSystemVirtualFolder('/sys/asm'); if ret then dbms_xdb.setACL('/sys/asm', '/sys/acls/all_owner_acl.xml'); end if; end; / commit; Rem create all folders associated with users and groups declare ret boolean; begin ret := dbms_xdb.createFolder('/sys/principals'); if ret then dbms_xdb.setACL('/sys/principals', '/sys/acls/bootstrap_acl.xml'); end if; ret := dbms_xdb.createFolder('/sys/principals/users'); if ret then dbms_xdb.setACL('/sys/principals/users', '/sys/acls/bootstrap_acl.xml'); end if; ret := dbms_xdb.createFolder('/sys/principals/groups'); if ret then dbms_xdb.setACL('/sys/principals/groups', '/sys/acls/bootstrap_acl.xml'); end if; ret := xdb.dbms_xdbutil_int.createSystemVirtualFolder('/sys/principals/users/db'); if ret then dbms_xdb.setACL('/sys/principals/users/db', '/sys/acls/bootstrap_acl.xml'); end if; ret := xdb.dbms_xdbutil_int.createSystemVirtualFolder('/sys/principals/users/ldap'); if ret then dbms_xdb.setACL('/sys/principals/users/ldap', '/sys/acls/bootstrap_acl.xml'); end if; ret := xdb.dbms_xdbutil_int.createSystemVirtualFolder('/sys/principals/users/application'); if ret then dbms_xdb.setACL('/sys/principals/users/application', '/sys/acls/bootstrap_acl.xml'); end if; ret := xdb.dbms_xdbutil_int.createSystemVirtualFolder('/sys/principals/groups/db'); if ret then dbms_xdb.setACL('/sys/principals/groups/db', '/sys/acls/bootstrap_acl.xml'); end if; ret := xdb.dbms_xdbutil_int.createSystemVirtualFolder('/sys/principals/groups/ldap'); if ret then dbms_xdb.setACL('/sys/principals/groups/ldap', '/sys/acls/bootstrap_acl.xml'); end if; ret := xdb.dbms_xdbutil_int.createSystemVirtualFolder('/sys/principals/groups/application'); if ret then dbms_xdb.setACL('/sys/principals/groups/application', '/sys/acls/bootstrap_acl.xml'); end if; end; / commit; Rem Create virtual folder for acl oids declare ret boolean; begin ret := xdb.dbms_xdbutil_int.createSystemVirtualFolder('/sys/acloids'); if ret then dbms_xdb.setACL('/sys/acloids', '/sys/acls/bootstrap_acl.xml'); end if; end; / commit; Rem create version virtual folder declare ret boolean; begin ret := xdb.dbms_xdbutil_int.createSystemVirtualFolder('/sys/version'); if ret then dbms_xdb.setACL('/sys/version', '/sys/acls/bootstrap_acl.xml'); end if; end; / commit; Rem Create the schema for folder listings. This is used for representing Rem folder listings with name and size of each entry. Its not intended Rem as a schema for folders - merely as a simple schema for listings. declare FLXSD VARCHAR2(4000) := ' '; FLURL VARCHAR2(2000) := 'http://xmlns.oracle.com/xdb/XDBFolderListing.xsd'; begin xdb.dbms_xmlschema.registerSchema(FLURL, FLXSD, FALSE, TRUE, FALSE, TRUE, FALSE, 'XDB'); end; /