Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 4 Apr 1996 13:54:36 -0500 (EST)
From:      John Fieber <jfieber@indiana.edu>
To:        HOSOKAWA Tatsumi <hosokawa@mt.cs.keio.ac.jp>
Cc:        terry@lambert.org, freebsd-hackers@FreeBSD.ORG, freebsd-mobile@FreeBSD.ORG
Subject:   Re: Laptop Survey Project / FreeBSD
Message-ID:  <Pine.NEB.3.92.960404130805.9803C-100000@fieber-john.campusview.indiana.edu>
In-Reply-To: <199604030714.QAA26756@frig.mt.cs.keio.ac.jp>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 3 Apr 1996, HOSOKAWA Tatsumi wrote:

> I'm writing perl script to convert it to readable text and HTML.

I hope you are aware that if you whip up a proper DTD, you can
use a proper sgml parser (sgmls(1)) whose output is much easier
to parse than raw sgml.  It deals with all sorts of tag omissions
and other difficlut to deal with sgml syntax, giving you a neat
normalized version.  If your conversions are simple enough, you
pipe the output into sgmlsasp(1) with an appropriate tag mapping
spec.  Both are standard in FreeBSD.

Oh, what the heck, save the file below and give it to sgmls to
see what I mean.

-john

== jfieber@indiana.edu ===========================================
== http://fieber-john.campusview.indiana.edu/~jfieber ============

<!-- First, the DTD -->

<!DOCTYPE lts [

<!-- lts is the outer element.  The hyphens mean that the start tag
     is manditory, the `o' means the end tag may be omitted.  The
     element may contain what is in the ().  A comma between two
     element names means they must occur in that sequence.  Use a
     vertical bar to allow any order.

     A ? following a name means an element is optional, a + means it
     must occur one or more times, a * means zero or more. -->

<!ELEMENT lts - o (name, addr?, mcn, cpu, ram, hdd, bios, fbsd, fbsdv,
    pccv, apm, apmv, config, pcic, crd+, ngcrd+, misc) >

<!-- This defines the content of the elements (except crd) as
     #PCDATA (Parsed Character DATA). -->

<!ELEMENT (name | addr | mcn | cpu | ram | hdd | bios | fbsd | fbsdv
    | pccv | apm | apmv | config | pcic | ngcrd | misc)
    - o (#PCDATA) >

<!-- crd has two sub elements -->
<!ELEMENT crd - o (type, conf)>

<!-- and the sub elements contain #PCDATA.  Note that the open tag of
     the type element can be omitted. -->
<!ELEMENT type o o (#PCDATA)>
<!ELEMENT conf - o (#PCDATA)>

]>


<!-- Now, the document instance.  Note various omitted end tags -->

<LTS>
<NAME> (requisite) Your Name
<ADDR> E-mail address (do not fill it if you don't want to publish it)
<MCN> (requisite) product name of your machine
<CPU> (requisite) CPU type
<RAM> (requisite) Amount of main memory
<HDD> (requisite) Amount of hard disk
<BIOS> Version number of BIOS
<FBSD> (requisite) Can you installed FreeBSD on this machine?
<FBSDV> Version number of FreeBSD
<PCCV> Version number of pccard-test package (if you're using it)
<APM> Does APM BIOS driver of FreeBSD works?
<APMV> Version number of APM BIOS
<CONFIG> Machine-depend "options" in config file
<PCIC> Type of PC-card controller </PCIC>
<CRD> <TYPE>PC-card (PCMCIA) that worked</TYPE>
        <CONF>
        Corresponding entry of /etc/pccard.conf
        </CONF>
</CRD>

<!-- Note here, the <TYPE> tags have been omitted.  They can be
     assumed from the context. -->

<CRD>PC-card (PCMCIA) that worked (notice the TYPE tag has been
enitrely omitted.)
        <CONF>
        Corresponding entry of /etc/pccard.conf
        </CONF>
</CRD>
<NGCRD>
    The Cards that you can't drive, even though README's and pccard.conf
    says that it works.
</NGCRD>
<NGCRD>.......</NGCRD>
<MISC> Additional information </MISC>
</LTS>




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.NEB.3.92.960404130805.9803C-100000>