OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: XSL customisation layer: directory structure


Hello all

(and a belated thanks to Mauritz and Bob for helpful replies to my last
question, which I seem to have neglected to report back on at the time -
have got link title attributes working nicely now via XLink.)


I'd been thinking I'd like to learn how to do a custom layer of XSL, so
as to tweak my HTML output a bit.

I've successfully made an initial file as described in Bob's book
(example 9.1 here:
http://www.sagehill.net/docbookxsl/CustomMethods.html#CustomizationLayer)
and begun to create my own templates, of which I currently have a couple 
in separate files, imported e.g. like this to the main one:
<xsl:import href="emphasis_custom.xsl"/>


Well, I was getting on OK until I got the bright idea that perhaps it 
would be best to move the various custom files into a separate directory 
rather than having them mixed in with the default ones.  At that point 
things stopped working.  So now I am wondering if in fact that was a 
foolish idea :-)


Is it _possible_ to use different directories, and if so, what do I need 
to do to make the relative addressing work so the templates can "see" 
each other?

Or do the custom files have to be in the same directory as the docbook 
default ones?  and in that case, is there any particular naming 
convention, for making the custom files easily identifiable if & when I 
upgrade and want to copy them over?


For background, here's what I did:

First I had set up a subdirectory of the html directory, and made my 
"top level" custom file call docbook like this:
<xsl:import href="../docbook.xsl"/>

It wasn't happy till I corrected the relative addressing for
<!ENTITY % common.entities SYSTEM "../common/entities.ent">
%common.entities;
]>
by making it
<!DOCTYPE xsl:stylesheet [
<!ENTITY % common.entities SYSTEM "../../common/entities.ent">
%common.entities;
]>

Then I got errors like "No template exists named anchor".

Then as an alternative I tried making a custom directory at the same 
level as the html directory, with
<xsl:import href="../html/docbook.xsl"/>
and changing the ENTITY thing above back to what it was before.

But I was still getting error messages of "No template exists named ...".

It seemed like one template could only "see" another if they were in the 
same directory.

(though oddly enough it doesn't seem to mind having the "main" custom 
layer file in another directory - but then at present that one isn't 
calling any templates, only importing others that do.)


Thanks in advance for clues.

Jennifer

-- 
www.uncharted-worlds.org/blog/


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]