You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by Antoine Levy-Lambert <an...@gmx.de> on 2006/05/09 15:50:49 UTC

Re: Setting Xalan to junitreport

Hello Toby,

it is not 100% straightforward.

junitreport normally works by pulling the stylesheets from ant.jar.

The <xslt/> task normally only works with plain files as stylesheets.

So I will first process a bug report showing how to use a resource as 
the stylesheet in the <xslt/> task.

Afterwards, if the other ant committers are happy with the change, I 
will refactor junitreport to delegate to <xslt/>.

If you want to follow the discussion further, we should do it on the 
developer list (dev at ant.apache.org).

Regards,

Antoine

Weston, Toby wrote:
> Hi Antoine,
>
> Sounds good, do you think it'll be straight forward? 
>
> Thanks again,
> Toby
>
> Antoine Levy-Lambert wrote:
>   
>> Hello Toby,
>>
>> I am thinking of changing junitreport to make it wrap around ant's
>> style task. 
>>
>> Regards,
>>
>> Antoine
>>
>> Weston, Toby wrote:
>>     
>>> Hi Folks,
>>>
>>> I'm having problems with junitreport... its picking up every other
>>> transformation engine than the default Xalan one (via the
>>> javax.xml.transform.TransformerFactory=xxx mechanism).
>>>
>>> So basically, I get;
>>>
>>> - Could not find a valid processor version implementation from xxx
>>>
>>> I've got Saxon in ANT_HOME\lib so it picks that up, plus I've got
>>> some JARs on the classpath, so it picks them up.
>>>
>>> My question is, can I force the transformation factory on the
>>> junitreport task? For example, with <style> I can set the factory;
>>> <xslt in="doc.xml" out="build/doc/output.xml"
>>> style="style/apache.xsl">
>>>
>>>   <factory name="org.apache.xalan.processor.TransformerFactoryImpl">
>>>
>>>     <attribute name="http://xml.apache.org/xalan/features/optimize"
>>> value="true"/> 
>>>
>>>   </factory>
>>>
>>> </xslt>
>>> Can I force <junitreport> to do the same somehow? I tried setting
>>> -Djavax.xml.transform.TransformerFactory=xxx etc but I guess its
>>> overridden). 
>>>
>>> If not, should I just try and remove all the other versions from the
>>> classpath / ANT_HOME\lib and fix the tasks that use them? This may be
>>> difficult because I'm using some third party tasks.
>>>
>>> Thanks for any tips :)
>>>
>>> Toby
>>>
>>>
>>>       



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Re: Setting Xalan to junitreport / bug report 39407

Posted by Matt Benson <gu...@yahoo.com>.
I can see that in this case since the resource in
question is unique to the task, it should be
sufficient to assume that a nested resource is a
stylesheet.

The real requirement that will necessitate the
attribute syntax, as I see it, is enforcing that a
single resource be specified as the output destination
for a given task.  :)

-Matt

--- Antoine Levy-Lambert <an...@gmx.de> wrote:

> Matt,
> 
> I plan to use the bug report :
> 
>
<http://issues.apache.org/bugzilla/show_bug.cgi?id=39407>.
> which contains an attachment where the resource is
> instantiated using the URL schemes.
> 
> I did not test it though to make sure that it does
> work with a jar:file: URL (not sure what the exact
> syntax is).
> 
> :-)
> 
> Regards,
> 
> Antoine
> 
> 
> Matt Benson wrote:
> > Antoine:  Does this put us back to needing a
> "scheme"
> > to translate a string (attribute value) to a
> Resource?
> >
> > -Matt
> >
> > --- Antoine Levy-Lambert <an...@gmx.de> wrote:
> >
> >   
> 
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> dev-unsubscribe@ant.apache.org
> For additional commands, e-mail:
> dev-help@ant.apache.org
> 
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Re: Setting Xalan to junitreport / bug report 39407

Posted by Antoine Levy-Lambert <an...@gmx.de>.
Matt,

I plan to use the bug report :

<http://issues.apache.org/bugzilla/show_bug.cgi?id=39407>.
which contains an attachment where the resource is instantiated using the URL schemes.

I did not test it though to make sure that it does work with a jar:file: URL (not sure what the exact syntax is).

:-)

Regards,

Antoine


Matt Benson wrote:
> Antoine:  Does this put us back to needing a "scheme"
> to translate a string (attribute value) to a Resource?
>
> -Matt
>
> --- Antoine Levy-Lambert <an...@gmx.de> wrote:
>
>   



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Re: Setting Xalan to junitreport

Posted by Matt Benson <gu...@yahoo.com>.
Antoine:  Does this put us back to needing a "scheme"
to translate a string (attribute value) to a Resource?

-Matt

--- Antoine Levy-Lambert <an...@gmx.de> wrote:

> Hello Toby,
> 
> it is not 100% straightforward.
> 
> junitreport normally works by pulling the
> stylesheets from ant.jar.
> 
> The <xslt/> task normally only works with plain
> files as stylesheets.
> 
> So I will first process a bug report showing how to
> use a resource as 
> the stylesheet in the <xslt/> task.
> 
> Afterwards, if the other ant committers are happy
> with the change, I 
> will refactor junitreport to delegate to <xslt/>.
> 
> If you want to follow the discussion further, we
> should do it on the 
> developer list (dev at ant.apache.org).
> 
> Regards,
> 
> Antoine
> 
> Weston, Toby wrote:
> > Hi Antoine,
> >
> > Sounds good, do you think it'll be straight
> forward? 
> >
> > Thanks again,
> > Toby
> >
> > Antoine Levy-Lambert wrote:
> >   
> >> Hello Toby,
> >>
> >> I am thinking of changing junitreport to make it
> wrap around ant's
> >> style task. 
> >>
> >> Regards,
> >>
> >> Antoine
> >>
> >> Weston, Toby wrote:
> >>     
> >>> Hi Folks,
> >>>
> >>> I'm having problems with junitreport... its
> picking up every other
> >>> transformation engine than the default Xalan one
> (via the
> >>> javax.xml.transform.TransformerFactory=xxx
> mechanism).
> >>>
> >>> So basically, I get;
> >>>
> >>> - Could not find a valid processor version
> implementation from xxx
> >>>
> >>> I've got Saxon in ANT_HOME\lib so it picks that
> up, plus I've got
> >>> some JARs on the classpath, so it picks them up.
> >>>
> >>> My question is, can I force the transformation
> factory on the
> >>> junitreport task? For example, with <style> I
> can set the factory;
> >>> <xslt in="doc.xml" out="build/doc/output.xml"
> >>> style="style/apache.xsl">
> >>>
> >>>   <factory
>
name="org.apache.xalan.processor.TransformerFactoryImpl">
> >>>
> >>>     <attribute
> name="http://xml.apache.org/xalan/features/optimize"
> >>> value="true"/> 
> >>>
> >>>   </factory>
> >>>
> >>> </xslt>
> >>> Can I force <junitreport> to do the same
> somehow? I tried setting
> >>> -Djavax.xml.transform.TransformerFactory=xxx etc
> but I guess its
> >>> overridden). 
> >>>
> >>> If not, should I just try and remove all the
> other versions from the
> >>> classpath / ANT_HOME\lib and fix the tasks that
> use them? This may be
> >>> difficult because I'm using some third party
> tasks.
> >>>
> >>> Thanks for any tips :)
> >>>
> >>> Toby
> >>>
> >>>
> >>>       
> 
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> user-unsubscribe@ant.apache.org
> For additional commands, e-mail:
> user-help@ant.apache.org
> 
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org