set echo on
--
spool publishDemo.log
--
def DEMOFOLDER = &1
--
-- Create index.html in the base folder pointing to WebDemo application
--
declare
  srcDocument varchar2(700) := '/home/XFILES/src/WebDemo/webDemo.html';
begin
  if dbms_xdb.existsResource('&DEMOFOLDER' || '/index.html') then
    dbms_xdb.deleteResource('&DEMOFOLDER' || '/index.html');
  end if;
  dbms_xdb.setAcl(srcDocument,'/sys/acls/bootstrap_acl.xml');
  dbms_xdb.link(srcDocument,'&DEMOFOLDER','index.html',DBMS_XDB.LINK_TYPE_WEAK);
end;
/
commit
/
quit