Relative URI with no Base

Here should go questions about transforming XML with XSLT and FOP.
joshuao
Posts: 2

Relative URI with no Base

Fri Nov 18, 2016 11:03 pm

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: 5514

Re: Relative URI with no Base

Mon Nov 21, 2016 9:24 am

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

Re: Relative URI with no Base

Tue Nov 22, 2016 8:05 pm

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

Return to “XSLT and FOP”

Who is online

Users browsing this forum: No registered users and 0 guests