[oXygen-user] calling templates in imported files (XSLT)
Lars Huttar
Sat Jul 15 06:59:00 CDT 2006
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
More information about the oXygen-user
mailing list