Subject: Links between HTML documents produced from SGML and DSSSL From: pkjames@xxxxxxxxxxx Date: Mon, 20 Jul 1998 13:47 +0000 (GMT) |
This is a question about how to set-up links between HTML documents produced from SGML and DSSSL inputs. I've got a 'BOOK' that is divided into SECTIONs. Each SECTION is divided into SUB-SECTIONs (book.sgml). I have two DSSSL files which are used with Jade to:- (1) output the BOOK in HTML - with one SECTION per HTML file (book_html.dsl), and (2) output an index to the SECTIONs and SUB-SECTIONs (book_index.dsl) I'd like to generate HTML hyperlinks from the index to each of the HTML SECTION files. For example, using the sgml and dsl files below I'd like to generate links such as:- Operator Documentation <A HREF="book-intro.html"> Introduction </A> <A HREF="book-intro.html#background"> Background </A> <A HREF="book-intro.html#service"> Service Levels </A> <A HREF="book-hardware.html"> Hardware Failures </A> <A HREF="book-intro.html#symptoms"> Symptoms </A> <A HREF="book-intro.html#contract"> Contractual Issues </A> I guess my question is - how do I hang onto the 'SNAME's (from SECTIONs) so that I can output them when I encounter a SECTION-TITLE or a SUB-SECTION tag? Any help much appreciated. Kirby ============================================================= ===================== book.sgml ============================= ============================================================= <!DOCTYPE BOOK [ <!ELEMENT BOOK - - (TITLE, SECTION*)> <!ELEMENT SECTION - - (SECTION-TITLE, SUB-SECTION*)> <!ATTLIST SECTION SNAME CDATA #REQUIRED> <!ELEMENT SECTION-TITLE - - (#PCDATA) > <!ELEMENT SUB-SECTION - - (TITLE, BODY)> .... <!-- ******************************************************** --> <BOOK> <TITLE>Operator Documentation</TITLE> <SECTION SNAME="intro"> <SECTION-TITLE>Introduction</SECTION-TITLE> <SUB-SECTION ID="background"> <TITLE>Background</TITLE> <BODY> ....... </BODY> </SUB-SECTION> <SUB-SECTION ID="service"> <TITLE>Service Levels</TITLE> <BODY> ....... </BODY> </SUB-SECTION> </SECTION> <SECTION SNAME="hardware"> <SECTION-TITLE>Hardware Failures</SECTION-TITLE> <SUB-SECTION ID="symptoms"> <TITLE>Symptoms</TITLE> <BODY> ...... </BODY> </SUB-SECTION> <SUB-SECTION ID="contract"> <TITLE>Contractual Issues</TITLE> <BODY> ..... </BODY> </SUB-SECTION> </SECTION> </BOOK> ============================================================= ===================== book_index.sgml ======================= ============================================================= (element (BOOK) (make sequence (make entity system-id: (string-append "index.html" ) ) (process-children) ) ) ;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (element (SECTION) (make sequence (make formatting-instruction data: "<H2>SECTION: " ) (make formatting-instruction data: ( attribute-string "SNAME" )) (make formatting-instruction data: " </H2>" ) (process-children) ) ) ;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (element SECTION-TITLE (make sequence (make formatting-instruction data: "<H3>" ) (process-children) (make formatting-instruction data: "</H3>" ) ) ) ;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (element TITLE (make sequence (make formatting-instruction data: "<H2>" ) (process-children) (make formatting-instruction data: "</H2>" ) ) ) ;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ============================================================= ===================== book_html.dsl ========================= ============================================================= (element BOOK (process-children) ) ;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (element (SECTION) (make sequence (make entity system-id: (string-append "book-" (attribute-string "SNAME") ".html" ) ) (process-children) ) ) ;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (element SECTION-TITLE (make sequence (make formatting-instruction data: <HTML><HEAD><TITLE>Documentation</TITLE></HEAD>" ) (make formatting-instruction data: "<H1>" ) (process-children) (make formatting-instruction data: "</H1>" ) ) ) ;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (element TITLE (make sequence (make formatting-instruction data: "<H2>" ) (make formatting-instruction data: "<FONT FACE=VERDANA,ARIAL,HELVETICA>" ) (process-children) (make formatting-instruction data: "</FONT>" ) (make formatting-instruction data: "</H2>" ) ) ) ;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ DSSSList info and archive: http://www.mulberrytech.com/dsssl/dssslist
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Speakers, Paul Prescod | Thread | Re: Links between HTML documents pr, Brandon Ibach |
Re: list of speakers, Arthur Lemmens | Date | Semantics question?, Pawson, David |
Month |