Skip to Main Content

DevOps, CI/CD and Automation

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

xsl:include not resolving no matter HOW I load the xslt

1003190Apr 15 2013 — edited Apr 17 2013
I cannot get *<xsl:include>* to work with XMLTRANSFORM in a PL/SQL environment in Oracle 11.2.0.3. I am exclusively working inside the database.

I have a base XSLT which includes another XSLT using xsl:include. I want to load the base XSLT as an XMLTYPE and have it transform another XML document, as if the entire XSLT were one large document.

I have loaded the base (base.xslt), the extension (include_with_base.xslt), and the combination of the two (entire_thing.xslt) in the XDB catalog. base.xslt has this statement inside its xsl:stylesheet node, attempting to include the other xslt:
*<xsl:include href="/public/include_with_base.xslt" />*

I have the xslts stored in XDB. This verifies they are intact:
1. The base xslt which has the xsl:include statement in it loads just fine.
select xdburitype('/public/base.xslt').getXML() from dual;

2. The extension which is the target of the include reference in the base xslt loads just fine.
select xdburitype('/public/include_with_base.xslt').getXML() from dual;

3. The combination of the two, where I cut-and-paste all children of xslt:stylesheet from include_with_base.xslt into the xslt:stylesheet node of base.xslt also loads just fine.
select xdburitype('/public/entire_thing.xslt').getXML() from dual;

However, when I try to execute a transformation of some test xml using base.xslt, it fails:
select XMLTRANSFORM(xdburitype('/public/xml_input.xml').getXML(), xdburitype('/public/base.xslt').getXML()) FROM dual;

When I try to execute the same transformation of the same test xml using entire_thing.xslt, it works:
select XMLTRANSFORM(xdburitype('/public/xml_input.xml').getXML(), xdburitype('/public/entire_thing.xslt').getXML()) FROM dual;

When I perform the transformation using altovaxml and the two xslts are in the same disk directory (and I use a relative reference with no path information rather than an absolute reference like I show in the examples above), the transformation works just fine.

What can I do to make XMLTRANSFORM work with an XSLT that has an essential <xsl:include ... /> reference in it?

Edited by: user11359697 on Apr 15, 2013 1:49 PM
This post has been answered by odie_63 on Apr 16 2013
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 15 2013
Added on Apr 15 2013
7 comments
1,845 views