commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Lerche <pe...@easyspeedy.com>
Subject [jelly] xslt transform fun (newbie)
Date Wed, 22 Dec 2004 13:45:56 GMT
Hi,

I am using Jelly as a embedded XML pipeline in a java program.

1. In the jelly docs (http://jakarta.apache.org/commons/jelly/pipeline.html) 
It describe following way to use the x:transform tag.

<x:transform xslt="file:///test/default.xslt">
	<x:parse xml="file:///test/data.xml"/>
</x:transform>

But it does not work. I get a "x:parser missing var attrib". 
I found a workaround. 

<x:parse xml="file:///test/data.xml" var="doc"/>
<x:transform xslt="file:///test/default.xslt" xml="${doc}"/>

but it defeats the XML pipeline idea.  I would appreciate if someone could 
comment on the problem.

2. If I use xsl:include in my xslt stylesheet I get following error 
 "javax.xml.transform.TransformerException: Had IO Exception with stylesheet 
file"

I first thought that Jelly lost the relative location path of the default.xslt 
file but even if I use the absolute file path in the xsl:include tag,  Jelly 
reports the same error stated above.

In other words - it does not work to include any <xsl:include 
href="default-util.xslt"/> or <xsl:include href="/test/default-util.xslt"/>
in my xslt file when transforming via Jelly.
By the way all of my xslt files work when called directly from Java.

Please any help would be appreciated. 

<x:transform xslt="file:///test/default.xslt" xml="${doc}"/>

default.xslt
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
     <xsl:output method="html" version="4.0" encoding="UTF-8" indent="no"/>
    <xsl:include href="default-util.xslt"/>
.......
 
-- 
Med venlig hilsen / Yours sincerely 
 
Peter
http://easyspeedy.com 
_______________________________________ 
European Dedicated Server Hosting 
Extremely low prices, secure, and reliable
Linux and BSD distributions only 
_______________________________________

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message