You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Martin van Dijken <mv...@madocke.nl> on 2002/06/27 11:01:05 UTC

XSLT: Could not create task of type: xslt.

Hi there,

We have an ant file going which javadoc's a web project we're doing. In 
addition to that I wanted to apply an XSL-sheet to the web.xml in order 
to make it legible. I checked out xslt in ant and found that that would 
do the trick. I put optional.jar in ANT_HOME/lib and also put the 
xalan.jar, xercesImpl.jar and xml-apis.jar in that directory. I then 
made this ant task:

<xslt in="${cms.sourceDir}/WEB-INF/web.xml"
   out="${cms.javaDoc}/web.html"
   style="${cms.sourceDir}/WEB-INF/styles/web.xsl">
    <classpath>
        <fileset dir="e:/ant/lib" includes="**/*.jar"/>
    </classpath>
</xslt>

Thinking this would do the trick for me. However when running this 
build.xml, I get:

F:\Projects\CMS.workdir\CMS\build.ant:99: Could not create task of type: 
xslt. Common solutions are to use taskdef to declare your task, or, if 
this is an optional task, to put the optional.jar in the lib directory 
of your ant installation (ANT_HOME).

I do however have optional.jar in the ANT_HOME/lib dir. Also I thought 
I'd declared xalan so that ant could find it.

Can anyone tell me what I'm doing wrong here?

Thanks in advance,

Martin van Dijken
mvdijken@madocke.nl

P.S. When I replace the xslt task with the style task, which should do 
the exact same thing, ant simply skips this task and continues to the 
next in line.... Weird...


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: XSLT: Could not create task of type: xslt.

Posted by Stefan Bodewig <bo...@apache.org>.
On Thu, 27 Jun 2002, Martin van Dijken <mv...@madocke.nl> wrote:

> <xslt in="${cms.sourceDir}/WEB-INF/web.xml"
>    out="${cms.javaDoc}/web.html"
>    style="${cms.sourceDir}/WEB-INF/styles/web.xsl">
>     <classpath>
>         <fileset dir="e:/ant/lib" includes="**/*.jar"/>
>     </classpath>
> </xslt>

If you are using the wrapper scripts we ship, you don't need the
classpath definition as ANT_HOME/lib/*.jar has been put on the system
classpath already.

Are you using Ant 1.5?  If not, try style instead of xslt, the name
xslt for the task is new in 1.5, but the task itself is available in
1.4.1 under the name style.

Stefan

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: XSLT: Could not create task of type: xslt.

Posted by Stefan Bodewig <bo...@apache.org>.
On Thu, 27 Jun 2002, Martin van Dijken <mv...@madocke.nl> wrote:

> P.S. When I replace the xslt task with the style task, which should
> do the exact same thing, ant simply skips this task and continues to
> the next in line.... Weird...

Oops, should have read up to here.

Firstly, this shows that you are not using 1.5 ;-)

If <style> is skipped, this means it thinks there is noting to do.
Run Ant with the -verbose switch to see which file timestamps it is
comparing.

Stefan

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: XSLT: Could not create task of type: xslt.

Posted by Martin van Dijken <mv...@madocke.nl>.
Diane Holt wrote:
> --- Martin van Dijken <mv...@madocke.nl> wrote:
> 
>>P.S. When I replace the xslt task with the style task, which should do 
>>the exact same thing, ant simply skips this task and continues to the 
>>next in line.... Weird...
> 
> 
> That's says you're running a version of Ant <1.5(Beta*). As for why it
> doesn't do anything, try setting the 'force' attribute and see if that
> gets it to do anything. If it doesn't, check your referenced properties,
> and make sure they're all set, and to what you think they are.
> 
> Diane
> 
> =====
> (holtdl@yahoo.com)
> 
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Yahoo! - Official partner of 2002 FIFA World Cup
> http://fifaworldcup.yahoo.com
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
> 
> 

Right on the money guys!

The references were correct, only the path after it didn't make sense. 
The verbose option made me see that something was actually being tried, 
only the files couldn't be located. The style task could be a little 
more verbose about that, but that's something for the developers.

Thanks Diane & Stephan


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: XSLT: Could not create task of type: xslt.

Posted by Diane Holt <ho...@yahoo.com>.
--- Martin van Dijken <mv...@madocke.nl> wrote:
> P.S. When I replace the xslt task with the style task, which should do 
> the exact same thing, ant simply skips this task and continues to the 
> next in line.... Weird...

That's says you're running a version of Ant <1.5(Beta*). As for why it
doesn't do anything, try setting the 'force' attribute and see if that
gets it to do anything. If it doesn't, check your referenced properties,
and make sure they're all set, and to what you think they are.

Diane

=====
(holtdl@yahoo.com)



__________________________________________________
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>