| 
 
Subject: HTML to DocBook translation From: Christian Leutloff <leutloff@xxxxxxxxxxxxxxxxx> Date: 04 Feb 1998 20:56:29 +0100 Mbox-line: From leutloff@sundancer.oche.de Wed Feb 4 20:56:30 1998  | 
Hello,
I want to translate some HTML documents into the DocBook format. I've
started with the following dsl:
<-------------------------
<!doctype style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN">
(declare-flow-object-class element
  "UNREGISTERED::James Clark//Flow Object Class::element")
(define (copy-attributes #!optional (nd (current-node)))
  (let loop ((atts (named-node-list-names (attributes nd))))
    (if (null? atts)
        '()
        (let* ((name (car atts))
               (value (attribute-string name nd)))
          (if value
              (cons (list name value)
                    (loop (cdr atts)))
              (loop (cdr atts)))))))
(default 
  (let* ((old-gi (gi (current-node)))
	 (new-gi
	  (case old-gi
	    (("H1") "sect2")
	    (("H2") "sect3")
	    (("H3") "sect4")
	    (("H4") "sect5")
	    (("LI") "item")
	    (("UL") "itemizedlist")
	    (("I")  "emphasize")
	    (("TT") "command")
	    (("P") "para")
	    (else old-gi))))
    (make element
	  gi: new-gi
	  attributes: (copy-attributes))))
<--------------------
But how can I translate the <a>-tag?
It is a label and a reference:
<a name="label">labelpos</a>
and
<a href="label">see labelpos</a>
Any ideas?
Has someone a working (it must not be perfect) solution?
Btw:
Where can I found I very *short* and easy introduction into DSSSL?
Is there a short reference for the DocBook DTD on 2 (or so) pages
available?
Thanks in advance
                Christian
-- 
Christian Leutloff, Aachen, Germany         leutloff@xxxxxxxxxxxxxxxxx  
      http://www.oche.de/~leutloff/         leutloff@xxxxxxxxxx      
            Debian GNU/Linux - http://www.de.debian.org/
Attachment:
pgp00000.pgp
Description: PGP signature
| Current Thread | 
|---|
  | 
| <- Previous | Index | Next -> | 
|---|---|---|
| Another multiply files & JADE quest, Andrei Kaikov | Thread | Re: HTML to DocBook translation, Thomas G. Lockhart | 
| Another multiply files & JADE quest, Andrei Kaikov | Date | Re: HTML to DocBook translation, Thomas G. Lockhart | 
| Month |