axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Amila Chinthaka Suriarachchi (JIRA)" <>
Subject [jira] Commented: (AXIS2-2749) Improved codegen XSLTIncludeResolver support for <xsl:include>
Date Thu, 28 Jun 2007 05:11:26 GMT


Amila Chinthaka Suriarachchi commented on AXIS2-2749:

if I change it like this 
} else if ((href != null) && (!href.equals("externalTemplate"))){
            Source source = getSourceFromTemplateName(href);
            if ((source != null) && ((StreamSource)source).getInputStream() != null){
                return source;
            return getEmptySource();

All tests will pass.
the reason here is if there is an invalid href the patch you have send return the emptySource
and the commited version returns null.

so I belive that sending a null is correct if user has given a wrong href name. But if you
want to return a emptySource (this may sometimes cause debuging problems) I commit it in that

the externalTemplate variable is used to define an externalTemplate at runtime if needed.
So  this is an existing thing and we have to treat it in a special way.

I'll commit the test cases as well. Sorry I have fogotten them since your patch has only the
Class change. 

I am bit reluctant to commit the patch in the way you have send it since it hide exceptions
and you have put a todo for that.

please replay soon since we are going to relase 1.3 soon.

> Improved codegen XSLTIncludeResolver support for <xsl:include>
> --------------------------------------------------------------
>                 Key: AXIS2-2749
>                 URL:
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Improvement
>          Components: codegen
>            Reporter: Peter Danielsen
>            Assignee: Amila Chinthaka Suriarachchi
>         Attachments: newpatch.txt,, XSLTIncludeResolver.patch.txt,, XSLTIncludeResolverTestTemplate.xsl
> I've been trying to create my own Axis2 codegen XSLT templates and would like to factor
out some common templates to a separate file that can be included by others.  An example is
a template that generates a method signature.  It would be included in a template that generates
an interface and in one that generates an implementation class.
> The current URI resolver used by the AxisServiceBasedMultiLanguageEmitter, XSLTIncludeResolver,
requires the value of an <xsl:include>'s href attribute to be a property that's in its
CodeGenConfiguration object. It looks like the only way to set the property is to write code.
It would be preferable refer to it directly in a template by setting the href to a value that
can be resolved by XSLTIncludeResolver using getResourceAsStream.  Such a change to XSLTIncludeResolver
will enable easier maintenance of the existing templates, once refactored, and easier development
of new templates since there won't be multiple copies of the same code to update when something

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message