commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject [jira] Updated: (JELLY-45) resource lookup in compiled scripts does not work properly
Date Thu, 04 Sep 2003 21:16:36 GMT
The following issue has been updated:

    Updater: Morgan Delagrange (
       Date: Thu, 4 Sep 2003 4:15 PM
             timeoriginalestimate changed from 0
             timeestimate changed from 0 minutes
             Component changed to core / taglib.core
For a full history of the issue, see:

View the issue:

Here is an overview of the issue:
        Key: JELLY-45
    Summary: resource lookup in compiled scripts does not work properly
       Type: Bug

     Status: Unassigned
   Priority: Major

 Time Spent: Unknown
  Remaining: Unknown

    Project: jelly
             core / taglib.core

   Reporter: Vincenz Braun

    Created: Thu, 20 Mar 2003 1:49 PM
    Updated: Thu, 4 Sep 2003 4:15 PM

Take the following code snippet:

JellyContext context = new JellyContext();
URL url = ImportTestcase.class.getResource("/resources/import.jelly");
XMLOutput out = XMLOutput.createXMLOutput(System.out);
// this works because of the created child context that has knowledge
// of the URL
context.runScript(url, out);

// This does not work because context has no currentURL set
// This results in a NullPointerException when resolving the
// stylesheet
Script script = context.compileScript(url);, out);

A compiled script should manage the lookup of referenced
resources by its own regardless of the context set. If you
cache scripts and use different contexts you do not always know
where the script is from.
That's why context.setCurrentURL(...) is no solution.

// import.jelly
<?xml version="1.0" encoding="ISO-8859-1"?>
<j:jelly xmlns:j="jelly:core" xmlns:x="jelly:xml" >
	<x:transform xslt="import.xsl">
		<x:param name="language" value="DE"/>

This message is automatically generated by JIRA.

If you think it was sent incorrectly contact one of the administrators:

If you want more information on JIRA, or have a bug to report see:

View raw message