Mailing List Archive

Support open source code!


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: tlug: SGML



I've changed the order of presentation to suit my own purposes.

>>>>> "ash" == Andrew S Howell <andy@example.com> writes:

    ash> Actually, this is what prompted my message. It was much more
    ash> that I could absorb, so I wanted to find out what tlugers
    ash> really use. Thanks for all the pointers.

I have done a little bit of SGML hacking, but not very successfully.
Basically I use linuxdoc-sgml-jp.  I don't need much more than that.

>>>>> "Matt" == Matt Gushee <matt@example.com> writes:

    Matt> Let's see ... I suppose you are aware of PSGML? It's the
    Matt> Emacs package for SGML editing ... works great, is packaged
    Matt> w/ the XEmacs distribution, but you have to install it
    Matt> yourself on FSF Emacs.

    ash> Got that as well. I tried parsing the DocBook DTD. After
    ash> about 20 minutes of emacs maxing out the CPU, I when home. It
    ash> finished at some point. It was fine when I came in the next
    ash> morning, a which point I saved the parsed DTD. Didn't want to
    ash> have to do that again! :)

No, I suppose not ;-)

The PSGML parser sucks as far as efficiency goes.  I have tried a fair 
number of DTDs, and it gets them all right, so I'm not going to complain.

    Matt> As far as conversion to other formats, hmmm... organizations
    Matt> w/ deep pockets buy expensive SGML systems that take care of
    Matt> everything for them w/out much effort, but good free tools
    Matt> are not all that abundant, I think (though I'm still just a
    Matt> beginner).

sp and jade are excellent, and pretty much all that you need.

Everything that I say below is true and not-true, false, and
not-false.  Caveat lector!

    ash> I miss-spoke when I said conversion. 

No, you didn't ....

    ash> I didn't really understand what SGML does ( most likely still
    ash> don't ).

SGML doesn't, SGML merely is.  ;-)  Leaving the realm of Zen
aphorisms, SGML is to documents written in natural language as BNF is
to programs written in computer languages.  SGML is a general way of
representing markup, that is, the syntax of placement of document
elements on a page.  SGML, like BNF, has no necessary relationship to
semantics.

sgmls and nsgmls are to SGML as yacc is to BNF.

SGML is useless until converted.

    ash> I was thinking it was more like TeX, in that it takes care of
    ash> formatting. Now I understand that this is not the case, that
    ash> the presentation ( formating, rendering ? ) of the SGML is
    ash> quite separate from it, which seems to be where DSSSL come
    ash> in.

No.  DSSSL is to SGML as objects are to methods.  That is, DSSSL
provides high level objects (like section headers), which can be
implemented in varying ways (bold vs. different font, numbered or
unnumbered) via methods.

    ash> Compiled up jade etc. Still a long way understanding
    ash> DSSSL. Am I right in thinking that one would takes an SGML
    ash> doc, and a DSSSL style sheet, and feed that thought jade to
    ash> produce a doc formated the way you want it? It seems that
    ash> DSSSL is mechanism to transform SGML into other formats,
    ash> possible even between different DTD?

One possible data flow diagram looks something like this:

        style                  rep
        sheet     DTD          def
          |        |            |
          V        V            V
doc --> jade --> nsgmls --> sgmlsasp --> tex --> dvips --> gs --> HP LJ6

One could, of course, defined a replacement definition to take you
directly to PDF, Postscript, or even PCL/HPGL.  But this is likely to
produce very inefficient code.  (Have you noticed that Mathematica
produces about 50KB of Postscript to output "a + b = c"?  Mathematica
--> TeX --> Postscript is much more efficient.)

No.  DSSSL is a mechanism whereby one document with a given logical
structure defined by the DTD can be given different appearances.  For
example, in its incarnation as an HTML style sheet, the style sheet
idea allows the author to specify whatever barbaric link colors s/he
likes in a style sheet which is downloaded with the HTML.  Then by
providing my own style sheet, I can override that with the correct
colors.  It's still the same HTML DTD, there are things that you
cannot do with it, so translating to a different DTD would be
dangerous.  However you can make the page look radically different by
using a different style sheet.

Another application would be to have a browser display stylesheet for
HTML, and a print style sheet for the same html.dtd.  The browser
display style would hide the ugly details of the link; the print style
would expose it.  linuxdoc.dtd currently handles this issue with the
ugly url/htmlurl hack.

-- 
University of Tsukuba                Tennodai 1-1-1 Tsukuba 305-8573 JAPAN
Institute of Policy and Planning Sciences        Tel/fax: +1 (298) 53-5091
--------------------------------------------------------------
Next Nomikai: 17 July, 19:30 Tengu TokyoEkiMae 03-3275-3691
Next Meeting: 8 August, Tokyo Station Yaesu central gate 12:30
featuring Linux on multiple platforms:
i386, Sparc, PA-Risc, Amiga, SGI, Alpha, PalmPilot, ...
--------------------------------------------------------------
Sponsor: PHT, makers of TurboLinux http://www.pht.co.jp


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links