Professional Documents
Culture Documents
Delete XML Publisher Data Definition and Template
Delete XML Publisher Data Definition and Template
The Problem:
In XML Publisher Administrator responsibility, both Data Definition and Template page dont
provide an option to delete data definition or template. Once created, you cant even change the
following:
Template Code
Template Application
Template Type
Due to some typo error or to give some more meaningful name as per the standards, you cant
change those fields later. Also you cant delete them too. Oracle recommends to disable them
by giving an end date. But many developers dont like to leave the wrong stuff in the system.
They better like to delete them and freshly recreate them.
The Workaround:
It is always recommended to go for this workaround in development instances and NOT in any
production or UAT instance. After making the Data Definition and Template perfect in dev
instance, you can always migrate them to production via FNDLOAD and XDOLOADER utilities.
Before the workaround, lets look at the main tables that store the information of the Data
Definitions and Templates.
XDO_LOBS: This table is used for storing locale (language and territory) sensitive
binary and text files. It is mainly used for storing language layout templates.
SELECT *
FROM XDO_LOBS
WHERE LOB_CODE = 'XX_DATA_DEF_CODE';
SELECT *
FROM XDO_CONFIG_VALUES
WHERE DATA_SOURCE_CODE = 'XX_DATA_DEF_CODE';
Delete the Data Definitions:
-- API to delete Data Definition from XDO_DS_DEFINITIONS_B and
XDO_DS_DEFINITIONS_TL table
BEGIN
XDO_DS_DEFINITIONS_PKG.DELETE_ROW (<DATA_DEF_APP_NAME>,<DATA_DEF_COD
E>);
COMMIT;
END;
-- Delete Data Templates, xml schema etc. from XDO_LOBS table (There is no API)
DELETE FROM XDO_LOBS
WHERE LOB_CODE = <DATA_DEF_CODE>
AND APPLICATION_SHORT_NAME = <DATA_DEF_APP_NAME>
AND LOB_TYPE IN
('XML_SCHEMA',
'DATA_TEMPLATE',
'XML_SAMPLE',
'BURSTING_FILE');
-- Delete from XDO_CONFIG_VALUES (if required)
DELETE FROM XDO_CONFIG_VALUES
WHERE APPLICATION_SHORT_NAME = <DATA_DEF_APP_NAME>
AND DATA_SOURCE_CODE = <DATA_DEF_CODE>;
Queries for the Templates:
SELECT *
FROM XDO_TEMPLATES_B
WHERE TEMPLATE_CODE = 'XX_TEMPLATE_CODE';
SELECT *
FROM XDO_TEMPLATES_TL
WHERE TEMPLATE_CODE = 'XX_TEMPLATE_CODE';
SELECT *
FROM XDO_LOBS
WHERE LOB_CODE = 'XX_TEMPLATE_CODE';
SELECT *
FROM XDO_CONFIG_VALUES
WHERE TEMPLATE_CODE = 'XX_TEMPLATE_CODE';