Relative URI with no Base

Here should go questions about transforming XML with XSLT and FOP.
joshuao
Posts: 2
Joined: Fri Nov 18, 2016 10:56 pm

Relative URI with no Base

Post by joshuao »

Hello,

I am getting a warning when transforming an XML file with xsl 2.0 stylesheet. The error goes like this:

Code: Select all

Description: XTDE1162: Relative URI passed to document() function (); but no base URI is available
I'm wondering if someone might point me in the right direction as to what can cause it to say no base URI is available.

Thank you in advance

Joshua
Radu
Posts: 9434
Joined: Fri Jul 09, 2004 5:18 pm

Re: Relative URI with no Base

Post by Radu »

Hi Joshua,

As far as I know XSLT has this concept of "context node" which is usually the node on which the current XSLT template gets applied. But if you are inside an xsl:function or you call a template by name, there is no context node so you need to probably pass the context node as a parameter and send it to the document() function (the function can take a base context node as a second parameter).

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
joshuao
Posts: 2
Joined: Fri Nov 18, 2016 10:56 pm

Re: Relative URI with no Base

Post by joshuao »

Thank you this was a HUGE help. Simply adding a reference to a node in the second parameter of the document() function fixed it.
Post Reply