Java Mailing List Archive

http://www.ant-tasks.com/

Home » Ant Users List »

AW: xslt version

Jan Materne

2008-03-13

Replies:
<xslt> (class XSLTProcess) uses external xsl processors. These are connected through org.apache.tools.ant.taskdefs.XSLTLiaison interface. The getLiaison() method itself calls the resolveProcessor() for instantiating the class. That uses the classname stored in "processor" which is settable as attribute.

So a <xslt processor="complete.other.processor.adapter"/> should work if you have an adapter for the other processor.

I only found one built-in adapter:
- org.apache.tools.ant.taskdefs.optional.TraXLiaison (default processor eg JAXP)


Jan


  private void resolveProcessor(String proc) throws Exception {
    String classname;
    if (proc.equals(PROCESSOR_TRAX)) {
       classname = TRAX_LIAISON_CLASS;
    } else {
       //anything else is a classname
       classname = proc;
    }
    Class clazz = loadClass(classname);
    liaison = (XSLTLiaison) clazz.newInstance();
  }





> -----Ursprüngliche Nachricht-----
> Von: Rebhan, Gilbert [mailto:Gilbert.Rebhan@(protected)]
> Gesendet: Donnerstag, 13. März 2008 09:47
> An: Ant Users List
> Betreff: RE: xslt version
>
> -----Original Message-----
> From: Z W [mailto:mpc8250@(protected)]
> Sent: Thursday, March 13, 2008 9:15 AM
> To: Ant Users List
> Subject: xslt version
>
> /*
> Is the xslt task in ant 1.7 using version 1 or version 2 ?
> */
>
> Not sure, as i don't use ant 1.7.0 and xslt task right now,
> but i think it's 1.0 as the xsl files in
> %ANT_HOME%/etc all have
>
> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
> version="1.0">
>
> but i read about ways to use xslt 2.0 with saxon =
> http://wiki.apache.org/ant/UsingAntWithXSLT20AndSaxon
>
> Regards, Gilbert
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)

©2008 ant-tasks.com - Jax Systems, LLC, U.S.A.