"Hello world!" in xml using jade/dsssl producing html

Subject: "Hello world!" in xml using jade/dsssl producing html
From: Jon Haugsand <Jon.Haugsand@xxxxx>
Date: 15 Dec 1998 14:47:53 +0100
I have successfully installed jade (I think), but have problems with
using the program. Tutorials of dsssl on the net does not hint on what
kind of files and command line options needed to process a simple
example of xml/dsssl and producing html/css. I particular, what use is
the file "catalog"? And is XML case sensitiv?

Here is a simple non-working example (courtesy to Lars Marius Garshol,
<url:http://www.ifi.uio.no/%7elarsma/>:

SP_CHARSET_FIXED=YES
SP_ENCODEING=XML
SGML_CATALOG_FILES=/nr/user/haugsand/share/jade/pubtext/xml.soc

jade -t html -w xml faq.xml
jade:faq.dsl:1:2:E: unknown declaration type "doctype"
jade:faq.dsl:3:0:E: character ";" not allowed in prolog
jade:faq.dsl:15:8:E: character "i" not allowed in prolog
jade:faq.dsl:25:8:E: character "(" not allowed in prolog
jade:faq.dsl:36:0:E: character "(" not allowed in prolog
jade:faq.dsl:48:8:E: character "(" not allowed in prolog
jade:faq.dsl:54:29:E: end of document in prolog
jade:E: specification document does not have the DSSSL architecture as a base architecture


The file faq.dtd:

<!ELEMENT FAQ     (INFO, PART+)>

<!ELEMENT INFO    (SUBJECT, AUTHOR, EMAIL?, VERSION?, DATE?)>
<!ELEMENT SUBJECT (#PCDATA)>
<!ELEMENT AUTHOR  (#PCDATA)>
<!ELEMENT EMAIL   (#PCDATA)>
<!ELEMENT VERSION (#PCDATA)>
<!ELEMENT DATE    (#PCDATA)>

<!ELEMENT PART    (Q+)>
<!ELEMENT Q       (QTEXT, A)>

<!ELEMENT QTEXT   (#PCDATA)>
<!ELEMENT A       (#PCDATA)>

<!ATTLIST PART    NO    CDATA #IMPLIED
                  TITLE CDATA #IMPLIED>
<!ATTLIST Q       NO    CDATA #IMPLIED>

-------------------------------
The file faq.xml:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!DOCTYPE FAQ SYSTEM "faq.dtd">
<FAQ>
  <INFO>
    <SUBJECT>   XML                </SUBJECT>
    <AUTHOR>    Lars Marius Garshol</AUTHOR>
    <EMAIL>     larsga@xxxxxxxxxx  </EMAIL>
    <VERSION>   1.0                </VERSION>
    <DATE>      20.jun.97          </DATE>
  </INFO>

  <PART NO="1">
  <Q NO="1">
    <QTEXT>What is XML?</QTEXT>
    <A>SGML light.</A>
  </Q>

  <Q NO="2">
    <QTEXT>What can I use it for?</QTEXT>
    <A>Anything.</A>
  </Q>

  </PART>
</FAQ>
---------------------------
The file faq.dsl:
<!doctype style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN">

;--- DSSSL stylesheet for FAQML

;---Constants

(define *font-size*     12pt)
(define *font*          "Times New Roman")
;---Element styles

(element FAQ
  (make simple-page-sequence
        font-family-name:       *font*
        font-size:              *font-size*
        input-whitespace-treatment: 'collapse
        line-spacing:           (* *font-size* 1.2)

        (process-children)))

(element INFO
  (make paragraph
        quadding:               'center
        space-after:            (* *font-size* 1.5)

        (process-children)))


(element SUBJECT
  (make paragraph
        font-size:              (* *font-size* 2)
        line-spacing:           (* *font-size* 2)
        space-after:            (* *font-size* 2)
        
        (process-children)))

(element VERSION
  (make paragraph
        
        (make sequence
          (literal "Version: "))
        (process-children)))

(element PART
  (make paragraph
        font-size:              (* *font-size* 1.5)
        line-spacing:           (* *font-size* 2)

        (make sequence
          (literal (attribute-string "NO" (current-node)))
          (literal ". ")
          (literal (attribute-string "TITLE" (current-node)))
          )

        (process-children)))
-------------------------------


-- 
Jon Haugsand
  Norwegian Computing Center, <http://www.nr.no/engelsk/> 
  <mailto:haugsand@xxxxx>  Pho: +47 22852608 / +47 22852500, 
  Fax: +47 22697660, Pb 114 Blindern, N-0314 OSLO, Norway


 DSSSList info and archive:  http://www.mulberrytech.com/dsssl/dssslist


Current Thread