Say we have XML data and XSL templates stored in a simple table:
CREATE TABLE x1 (item varchar(25) primary key, xml xmltype);
Where the data is stored with item="data", and the XSL template to extract paths to text is stored as item="xsl-to-text", then our transform may be executed as simply as this:
(select xml from x1 where item='xsl-to-text')
).getstringval() into v_out_text
from x1 where item='data';
A full sample script is available here.