You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by "per.cedde@gmail.com" <pe...@gmail.com> on 2013/04/03 16:59:34 UTC

xslt: TransformerException: include href is empty

Hi

Have a problem when I use xlst and have a xls that contains the function
document(‘’).
For ex.
<xsl:variable name="month-node"
select="document('')/*/date:months/date:month[number(2)]"/>

This gives an exception like:  javax.xml.transform.TransformerException:
include href is empty

I have tried to use saxon, according to
http://camel.465427.n5.nabble.com/xslt-error-with-document-td5713535.html,
without any success.

My route:
<from uri="file:./xmlin/rcv/?move=./../inp"/>

<to uri="xslt:DocTest.xsl"/>

I’m stuck, grateful for any help…

Regards, Per 




--
View this message in context: http://camel.465427.n5.nabble.com/xslt-TransformerException-include-href-is-empty-tp5730288.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: xslt: TransformerException: include href is empty

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

Yeah we love contributions. See here
http://camel.apache.org/contributing.html

On Fri, Jul 12, 2013 at 10:58 AM, per.cedde@gmail.com
<pe...@gmail.com> wrote:
> Hi again,
>
> Is this problem existing, due to camels own XsltUriResolver?
> It seems that camels XsltUriResolver only is capable to handle files
> either from the classpath or the file system.
> With the xlst function, document(''), the xslt processer should be able to
> handle that the result "is the source XML of the XSLT document itself".
>
>
> Should I create a JIRA case for camel? Is there any guidelines how to
> proceed?
>
> Regards / Per
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/xslt-TransformerException-include-href-is-empty-tp5730288p5735567.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen

Re: xslt: TransformerException: include href is empty

Posted by "per.cedde@gmail.com" <pe...@gmail.com>.
Hi again,

Is this problem existing, due to camels own XsltUriResolver?
It seems that camels XsltUriResolver only is capable to handle files 
either from the classpath or the file system. 
With the xlst function, document(''), the xslt processer should be able to
handle that the result "is the source XML of the XSLT document itself".


Should I create a JIRA case for camel? Is there any guidelines how to
proceed?

Regards / Per 



--
View this message in context: http://camel.465427.n5.nabble.com/xslt-TransformerException-include-href-is-empty-tp5730288p5735567.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: xslt: TransformerException: include href is empty

Posted by "per.cedde@gmail.com" <pe...@gmail.com>.
Yes, it's valid and works with other tools.
Below is an example.

The file 1.xml, placed in the directory ./xmlin/rcv/

<?xml version="1.0" encoding="ISO-8859-1"?>
<root>
1 
</root>

The file DocTest.xsl, placed in the directory target/classes (that is part
of the classpath)

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet  xmlns:date="http://exslt.org/dates-and-times" version="1.1"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
	<date:months>
		<date:month length="31" abbr="Jan">January</date:month>
		<date:month length="28" abbr="Feb">February</date:month>
	</date:months>
	<xsl:template match="root">
			<xsl:variable name="month-node"
select="document('')/*/date:months/date:month[number(2)]"/>
			<xsl:element name="MyDate">
				<xsl:value-of select="$month-node"/>
			</xsl:element>
	</xsl:template>
</xsl:stylesheet>



--
View this message in context: http://camel.465427.n5.nabble.com/xslt-TransformerException-include-href-is-empty-tp5730288p5730315.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: xslt: TransformerException: include href is empty

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

The xslt fixes is mostly about loading resources.

Are you sure the document function is a valid xslt function?


On Thu, Apr 4, 2013 at 8:53 AM, per.cedde@gmail.com <pe...@gmail.com> wrote:
> Hi
>
> Thanks for your reply.
> I'm using version 2.10.4. I saw in the relese notes of 2.11 something
> written about corrections for xslt. Do you think this correction should fix
> my problem?
>
> I can also post an example if needed.
>
> Regards, Per
>
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/xslt-TransformerException-include-href-is-empty-tp5730288p5730313.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



--
Claus Ibsen
-----------------
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cibsen@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen

Re: xslt: TransformerException: include href is empty

Posted by "per.cedde@gmail.com" <pe...@gmail.com>.
Hi

Thanks for your reply. 
I'm using version 2.10.4. I saw in the relese notes of 2.11 something
written about corrections for xslt. Do you think this correction should fix
my problem? 

I can also post an example if needed.

Regards, Per




--
View this message in context: http://camel.465427.n5.nabble.com/xslt-TransformerException-include-href-is-empty-tp5730288p5730313.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: xslt: TransformerException: include href is empty

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

What Camel version do you use?
And have you tried upgrading to a newer release? We have fixed some
issues loading resources with the xslt component.

On Wed, Apr 3, 2013 at 4:59 PM, per.cedde@gmail.com <pe...@gmail.com> wrote:
> Hi
>
> Have a problem when I use xlst and have a xls that contains the function
> document(‘’).
> For ex.
> <xsl:variable name="month-node"
> select="document('')/*/date:months/date:month[number(2)]"/>
>
> This gives an exception like:  javax.xml.transform.TransformerException:
> include href is empty
>
> I have tried to use saxon, according to
> http://camel.465427.n5.nabble.com/xslt-error-with-document-td5713535.html,
> without any success.
>
> My route:
> <from uri="file:./xmlin/rcv/?move=./../inp"/>
>
> <to uri="xslt:DocTest.xsl"/>
>
> I’m stuck, grateful for any help…
>
> Regards, Per
>
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/xslt-TransformerException-include-href-is-empty-tp5730288.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cibsen@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen