Hi Matt,

> -------- Original-Nachricht --------
> Datum: Wed, 7 Jun 2006 07:44:43 -0700 (PDT)
> Von: Matt Benson <[EMAIL PROTECTED]>
> An: Ant Developers List <dev@ant.apache.org>
> Betreff: Re: adding getURL() to Resource [WAS:  [Bug 39407]  - Change <xslt> 
> task to accept the XSLT stylesheet as a resource]
> 
> --- Antoine Levy-Lambert <[EMAIL PROTECTED]> wrote:
> 
> > Hi,
> > 
> > XSLT processing, and maybe other tasks would need a
> > method getURL() to be added to Resource.
> > 
> > Any thoughts on that ?
> > 
> > If we do it, do we do :
> > String() getURL() 
> > 
> > or
> > 
> > java.net.URL getURL()
> 
> Hmm.  I'm not smart enough for this.  I guess we
> probably should as file resources have urls.  What
> does that say for <url>?  Is that a conflict, or is it
> just the most generic of the "real" resource types? 
this is not a conflict
> If we make it part of the resource then I would think
> we should use the actual URL type; 
OK
> in fact URLResource
> already has this property, so it already implements
> this.  This way custom resource implementations could
> create the URL they return with a custom
> URLStreamHandler and the resulting URLs would be able,
> with sufficient JVM permissions set, to behave
> appropriately for whatever resource is declared.  How
> does this sound to anyone who cares?
> 
I have never dealt with URLStreamHandler(s)
> -Matt
> 
My concern is that the system id of stylesheets (or XML documents) which
the <xslt/> task is processing should be set in such a way that entity includes 
or <xsl:include href=""/> can be resolved properly.

For instance, if we are doing an XSLT transformation with a stylesheet which is 
defined as a zip resource, for instance the entry 
org/apache/tools/ant/taskdefs/optional/junit/xsl/junit-frames.xsl
from ant-junit.jar, the system id should be set in such a way that if there is 
in junit-frames.xsl a <xsl:include href="junit-generic.xsl"/> , and 
junit-generic.xsl is also packaged in ant-junit.jar under 
org/apache/tools/ant/taskdefs/optional/junit/xsl, the include will be found and 
used properly.

Same for XML documents having entity includes, or referencing local DTD's or 
schemas.

Regards,

Antoine




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to