DOCBOOK-APPS: Re: Customizing DocBook to Produce a real URL Tree

2002-11-26 Thread Shlomi Fish
On Tue, 26 Nov 2002, Ian Castle wrote:

 With DSSSL (and I imagine XSL) it would be perfectly possible to generate the
 node names... the problem would be creating the directories - as there are no
 facilities in DSSSL to do file manipulation on the underlying file system.

 However, DSSSL is extensible so you could create an external procedure to do
 this for you.

 There would be quite a fair bit of work involved for a novice - and a few days
 for an expert.


Would it be possible to scan the XML beforehand (say with a Perl script)
and make the directory structure for jade, a priori?

Regards,

Shlomi Fish

 On Tuesday 26 Nov 2002 4:20 pm, Janning Vygen wrote:
  Am Dienstag, 26. November 2002 16:38 schrieb Dennis Grace:
   Shlomi Fish asks:
  
   I'm not happily using the db2* tools to convert DocBook/XML into
   various formats. However, I noticed that jade put all the HTML file
   into one directory and calls them with obscure names such as:
  
   book1.html
   c16.html
   x208.html
  
   etc. Now what I want is that it will be real URL Tree:
  
(Root)
   [id1]
   [id1]/[id2]
   [id1]/[id2]/[id3]
   [id4]
  
   snip
  
   My question: how can I customize the DSSSL (or XSL while we're at
   it) stylesheets to produce such a tree? (and still maintain
   prev-next-up link consistency and link to the same CSS stylesheet)
  
   
  
   For the DSSSLs, in your customization layer you need to set:
  
  (define %use-id-as-filename%
   #t)
  
   For XSL, two params do the task you're trying to assign. If you set
  
   xsl:param name=use.id.as.filename select=1
  
   the id attribute will be used for all chunks except the root, which
   will be named index.html. If you would rather set the root filename
   to the id, set
  
   xsl:param name=root.filename select=@id
 
  Thats not what he asked for, everything is still in one directory.
 
  kind regards
  janning
 
  ---
  PLANWERK 6
  websolutions
 
  Herzogstraße 85
  40215 Düsseldorf
 
  fon 0211 - 601 606 93
  fax 0211 - 601 591 7
 
  [EMAIL PROTECTED]
  http://www.planwerk6.de
  ---




--
Shlomi Fish[EMAIL PROTECTED]
Home Page: http://t2.technion.ac.il/~shlomif/

He who re-invents the wheel, understands much better how a wheel works.




Re: DOCBOOK-APPS: Re: Customizing DocBook to Produce a real URL Tree

2002-11-26 Thread Ian Castle

On Wednesday 27 Nov 2002 4:47 am, Shlomi Fish wrote:

 Would it be possible to scan the XML beforehand (say with a Perl script)
 and make the directory structure for jade, a priori?

Yep. Anything is possible! You could also process it with DSSSL - rather than 
having the stylesheet emit HTML, it could emit a series of

mkdir -p id/id

openjade -t fot produces a tree of the flow objects in XML format - i.e. 
the things that actually need to be rendered. I suppose it is a bit like 
fop. fot is really openjade's internal representation of the processed 
data - the HTML/TeX/RTF or whatever backends are really turning the Flow 
Object Tree (FOT) into some other format.

Anyway, the FOT might be a better/easier thing to process to get the ids in 
the correct order etc. for creating directories.

In a sense whether you choose to do it with XSL or DSSSL is immaterial. Either 
way would require some work. The neatest solutions require more work!


 Regards,

   Shlomi Fish



Ian.