Re: DOCBOOK: customizing docbook xsl

2002-04-09 Thread Dave Pawson

At 13:42 09/04/2002 -0400, Stefan Seefeld wrote:

Uhm, you don't like the frames ?

I understood the intent, just totally missed the solution :-)

Well, the idea is that you can browse the document structure, content, as 
well as annotations in parallel. Right now I'm more or less trying to
mimic the look and feel of this:

http://www.unidata.ucar.edu/community/committees/umada/d0021/d0021-t.html


One hairy website!


Where's the stylesheet again?

http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/berlin//web/xsl/doc.xsl?rev=1.6content-type=text/vnd.viewcvs-markup

It's still very specific to our needs, but it might well be generalized at 
some point

OK, I'll look again when you get to that point. I believed it was at that stage
from your earlier message.

Regards DaveP





Re: DOCBOOK: customizing docbook xsl

2002-04-08 Thread Stefan Seefeld

Bob Stayton wrote:


 Hope this helps.  I'd be curious to see it working,
 and maybe you could contribute a FAQ based on your
 experience.


well, here is a first draft of it online:

http://www2.fresco.org/tutorial/index.html

The stylesheet does basically two things:

* it puts everything into frames
* it adds links to an external tool (a wiki, for now)
   in front of each chapter/appendix/section title

The idea of that added link is to let others review such
a document, and add comments to specific sections, based on
which the whole document can evolve.
If this is integrated with tools such as issue trackers, it
could be used to collaborate on software design and other
non-coding activity (not to speak of domains outside the realm
of software...).

I only use the wiki temporarily until I have found something
more suitable. But the basic idea remains unaffected, in particular
the xsl transformation aspect.

At some point I'll put the xsl code online. For now please
tell me if you really want to see it :-)
It's not long, about 250 lines.
I hope someone else finds this as useful as I do...

Best regards,
Stefan







Re: DOCBOOK: customizing docbook xsl

2002-04-02 Thread Bob Stayton

On Tue, Apr 02, 2002 at 10:17:18AM -0500, Stefan Seefeld wrote:
 hi there,
 
 I'd like to modify the html generating xsl a bit so I'm
 looking for advice on where to look for the templates I
 need to override:
 
 I want to generate a framed html, similar to this picture:
 
 http://d3e.sourceforge.net/screens/d3e-ui.jpg,
 
 with the main document in one frame (chunked, probably),
 and the toc and some other meta info in separate frames
 (the main new thing being some embedded cgi to attach
 issues (commands for now) to sections of the document.
 
 Any advice or comment is highly appreciated !

You'll need to look at several templates to do this:

1.  In autotoc.xsl, the subtoc named template 
is the one that generates the actual HTML list elements
for a TOC.  There you will want to add the TARGET attribute
to the generated TOC a anchor elements to point to your
main document window.  It looks like you will want
to modify the look of the TOC as well.

2.  In chunk.xsl, modify the process.root template
to generate the frameset document before any chunking takes
place.

3.  You'll probably want to turn off the navigation headers
and footers that appear on each page, since the left frame
provides much of that.  That way you don't have to worry
about trying to link the Home back to the left frame.
You can do that by making new footer.navigation and
header.navigation templates that are no-ops.

4.  For your links within your pages to other frames,
you could add a role attribute on those
xref or link elements, and then modify the
templates in xref.xsl to add the HTML TARGET attribute
accordingly..

5.  If your cgi links are all to the same frame, then you
could use or generate ulinks and set the 'ulink.target'
stylesheet parameter to that frame name.  But that's a
single global name, and may not work for your purposes.

Hope this helps.  I'd be curious to see it working,
and maybe you could contribute a FAQ based on your
experience.
-- 

Bob Stayton 400 Encinal Street
Publications Architect  Santa Cruz, CA  95060
Technical Publications  voice: (831) 427-7796
Caldera International, Inc. fax:   (831) 429-1887
email: [EMAIL PROTECTED]



Re: DOCBOOK: customizing docbook xsl

2002-04-02 Thread Stefan Seefeld

Hi Bob,

thanks for your very detailed help !

Bob Stayton wrote:

 You'll need to look at several templates to do this:
 
 1.  In autotoc.xsl, the subtoc named template 
 is the one that generates the actual HTML list elements
 for a TOC.  There you will want to add the TARGET attribute
 to the generated TOC a anchor elements to point to your
 main document window.  It looks like you will want
 to modify the look of the TOC as well.

ok, for now I modified the original template. It's so big...
Norm, wouldn't this be worth to be done with a parameter ?
There is now a template 'href.target'. If that became two
templates, one for the 'href' attribute, one for the 'target',
one could easily customize them, without messing with that
huge 'subtoc' template itself.


 2.  In chunk.xsl, modify the process.root template
 to generate the frameset document before any chunking takes
 place.

works fine.


 3.  You'll probably want to turn off the navigation headers
 and footers that appear on each page, since the left frame
 provides much of that.  That way you don't have to worry
 about trying to link the Home back to the left frame.
 You can do that by making new footer.navigation and
 header.navigation templates that are no-ops.

I discovered that there is a parameter 'suppress.navigation'
which is set to '0' by default...

 4.  For your links within your pages to other frames,
 you could add a role attribute on those
 xref or link elements, and then modify the
 templates in xref.xsl to add the HTML TARGET attribute
 accordingly..

right

 5.  If your cgi links are all to the same frame, then you
 could use or generate ulinks and set the 'ulink.target'
 stylesheet parameter to that frame name.  But that's a
 single global name, and may not work for your purposes.

I think it does.

 Hope this helps.  I'd be curious to see it working,
 and maybe you could contribute a FAQ based on your
 experience.

yeah, will do. I plan to evolve this into a real project,
where this cgi script is a hook into an issue tracker or something
similar, to make this feature really useful. Let's see
where this takes us. I hope to integrate this stuff into
the fresco project site (formerly berlin), so you can watch
the progress. If it is useful in itself, may be it can become
a docbook contribution...

Thanks again for the help !

Regards,
Stefan