[oXygen-user] calling templates in imported files (XSLT)

George Cristian Bina
Mon Jul 17 04:02:04 CDT 2006


Hi Lars,

The real problem is the first situation, the second situation should be 
solved though a catalog as you mention.

The first situation was covered also in my presentation at XML Prague. 
The problem appears not only for XSLT but also for XQuery, Relax NG 
schema and XML in general (external entities).

This problem is planned to be resolved in the next oXygen release. The 
idea is to define a main document and apply operations on that document 
instead of the fragment.

A workaround for XSLT development is to define components also locally 
if that is possible. You can do that in case of a template, if the 
stylesheet is imported from another stylesheet then the template defined 
in the imported document will not be used.

Best Regards,
George
---------------------------------------------------------------------
George Cristian Bina
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com


Lars Huttar wrote:
> Shawn McKenzie wrote:
>> It is not a big deal, but when I call a template that is in an
>> imported xsl file, Oxygen complains that the template does not exist.
> 
> Are you talking about the situation where the imported stylesheet calls 
> a template that's in the importing stylesheet? That's when I most 
> frequently run into this problem. (Call this situation A.)
> 
> Another scenario (situation B) is when the imported file is not in the 
> right place relative to the importing stylesheet, and you're editing the 
> importing stylesheet. This happens when I'm developing code that is to 
> be assembled and copied into a deployment area. Once it's deployed, the 
> stylesheets will be in the right place relative to each other; but in 
> the development areas, they're not.
> This prevents validation of the importing stylesheet while I'm editing it.
> 
>> Is there a way to shut that warning off, or have it resolve templates
>> in open files, project files or have it trace the imports for a
>> multiple file transform?
> 
> I'm trying to think what is done for similar situations in an IDE for, 
> e.g., a Java or C program.
> Maybe (for situation A) we need to add a processing-instruction in the 
> imported stylesheet to tell Oxygen what it's imported by, e.g.
> <?xsl-stylesheet imported-by="root.xsl" ?>
> 
> For situation B, maybe a way to specify a base URL, so that relative 
> paths to imported stylesheets will work. E.g.
> <?xsl-stylesheet base="../../transforms" ?>
> (Or maybe I should use an XML catalog?)
> 
> Lars
> 
> 
> 
> _______________________________________________
> oXygen-user mailing list
> 
> http://www.oxygenxml.com/mailman/listinfo/oxygen-user



More information about the oXygen-user mailing list