
From: mrose+mtr.netnews@dbc.mtview.ca.us (Marshall T. Rose)
Date: Thu, 29 Nov 2001 11:50:47 -0800
Subject: [xml2rfc] different dictionaries
References: <280640000.1007048125@classic> <0a1f01c178fd$73ae8240$fe0aa840@FATORA> <340970000.1007056592@classic>
Message-ID: <00bb01c1790f$244b27a0$fe0aa840@FATORA>

This is a multi-part message in MIME format.

------=_NextPart_000_00B8_01C178CC.15DA15C0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit

> I was thinking about this option too: having a two-way filter.

this may be problematic, given that docbook is a large superset over 2629...


> Yes I'm interested in you 1-way filter. (might be good to put on your
> xml2rfc web site for others).

it's attached. i'll put it in the next release.

> (I may rewrite it in perl (more familiar to me than tcl) for 2-ways
> filtering... ;-)) I'll submit to the list when done.)

that would be great. going from 2629 to docbook is probably a simple
application for xslt.

/mtr


------=_NextPart_000_00B8_01C178CC.15DA15C0
Content-Type: application/octet-stream;
	name="xml2sgml.tcl"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
	filename="xml2sgml.tcl"

#!/bin/sh=0A=
# the next line restarts using wish \=0A=
exec wish "$0" "$0" "$@"=0A=
=0A=
=0A=
# TODO:=0A=
#       seriesInfo: RFC, I-D=0A=
#       iref=0A=
=0A=
=0A=
package require xml 1.8=0A=
=0A=
=0A=
global dparser=0A=
if {![info exists dparser]} {=0A=
    set dparser ""=0A=
}=0A=
=0A=
=0A=
proc xml2sgml {input {output ""}} {=0A=
    global errorCode errorInfo=0A=
    global dparser errorP passno stdout=0A=
=0A=
    if {![string compare [file extension $input] ""]} {=0A=
        append input .xml=0A=
    }=0A=
=0A=
    set stdin [open $input { RDONLY }]=0A=
    set inputD [file dirname [set ifile $input]]=0A=
=0A=
    if {![string compare $output ""]} {=0A=
        set output [file rootname $input].sgml=0A=
    }=0A=
    if {![string compare $input $output]} {=0A=
        error "input and output files must be different"=0A=
    }=0A=
=0A=
    if {[file exists [set file [file join $inputD .xml2rfc.rc]]]} {=0A=
        source $file=0A=
    }=0A=
=0A=
    set data [prexml [read $stdin] $inputD $input]=0A=
=0A=
    catch { close $stdin }=0A=
=0A=
    set code [catch {=0A=
        if {![string compare $dparser ""]} {=0A=
            global emptyA=0A=
=0A=
            set dparser [xml::parser]=0A=
            array set emptyA {}=0A=
=0A=
            $dparser configure \=0A=
                        -elementstartcommand          { xml_begin        =
   } \=0A=
                        -elementendcommand            { xml_end          =
   } \=0A=
                        -characterdatacommand         { xml_pcdata       =
   } \=0A=
                        -entityreferencecommand       ""                 =
     \=0A=
                        -errorcommand                 { unexpected error =
   } \=0A=
                        -warningcommand               { unexpected =
warning  } \=0A=
                        -entityvariable               emptyA             =
     \=0A=
                        -final                        yes                =
     \=0A=
                        -reportempty                  no=0A=
        }=0A=
=0A=
        set passmax 2=0A=
        set stdout ""=0A=
        for {set passno 1} {$passno <=3D $passmax} {incr passno} {=0A=
            xml_pass start $output=0A=
            $dparser parse $data=0A=
            xml_pass end=0A=
            if {$errorP} {=0A=
                break=0A=
            }=0A=
        }=0A=
    } result]=0A=
    set ecode $errorCode=0A=
    set einfo $errorInfo=0A=
=0A=
    catch { close $stdout }=0A=
=0A=
    if {$code =3D=3D 1} {=0A=
        set result [around2fl $result]=0A=
=0A=
        catch {=0A=
            global stack=0A=
=0A=
            if {[llength $stack] > 0} {=0A=
                set text "Context: "=0A=
                foreach frame $stack {=0A=
                    append text "\n    <[lindex $frame 0]"=0A=
                    foreach {k v} [lindex $frame 2] {=0A=
                        regsub -all {"} $v {&quot;} v=0A=
                        append text " $k=3D\"$v\""=0A=
                    }=0A=
                    append text ">"=0A=
                }=0A=
                append result "\n\n$text"=0A=
            }=0A=
        }=0A=
    }=0A=
=0A=
    return -code $code -errorinfo $einfo -errorcode $ecode $result=0A=
}=0A=
=0A=
proc prexml {stream inputD {inputF ""}} {=0A=
    global env tcl_platform=0A=
=0A=
    if {[catch { set path $env(XML_LIBRARY) }]} {=0A=
        set path [list $inputD]=0A=
    }=0A=
    switch -- $tcl_platform(platform) {=0A=
        windows {=0A=
            set c ";"=0A=
        }=0A=
=0A=
        default {=0A=
            set c ":"=0A=
        }=0A=
    }=0A=
    set path [split $path $c]=0A=
=0A=
    if {[string first "%include." $stream] < 0} {=0A=
        set newP 1=0A=
    } else {=0A=
        set newP 0=0A=
    }=0A=
    set stream [prexmlaux $newP $stream $inputD $inputF $path]=0A=
=0A=
# because <![CDATA[ ... ]]> isn't supported in TclXML...=0A=
    set data ""=0A=
    set litN [string length [set litS "<!\[CDATA\["]]=0A=
    set litO [string length [set litT "\]\]>"]]=0A=
    while {[set x [string first $litS $stream]] >=3D 0} {=0A=
        append data [string range $stream 0 [expr $x-1]]=0A=
        set stream [string range $stream [expr $x+$litN] end]=0A=
        if {[set x [string first $litT $stream]] < 0} {=0A=
            error "missing close to CDATA"=0A=
        }=0A=
        set y [string range $stream 0 [expr $x-1]]=0A=
        regsub -all {&} $y {\&amp;} y=0A=
        regsub -all {<} $y {\&lt;}  y=0A=
        append data $y=0A=
        set stream [string range $stream [expr $x+$litO] end]=0A=
    }=0A=
    append data $stream=0A=
=0A=
    return $data=0A=
}=0A=
=0A=
proc prexmlaux {newP stream inputD inputF path} {=0A=
    global fldata=0A=
=0A=
# an MTR hack...=0A=
=0A=
# the old way:=0A=
#=0A=
# whenever "%include.whatever;" is encountered, act as if the DTD =
contains=0A=
#=0A=
#       <!ENTITY % include.whatever SYSTEM "whatever.xml">=0A=
#=0A=
# this yields a nested (and cheap-and-easy) include facility.=0A=
#=0A=
=0A=
# the new way:=0A=
#=0A=
# <?rfc include=3D'whatever' ?>=0A=
#=0A=
# note that this occurs *before* the xml parsing occurs, so they aren't =
hidden=0A=
# inside a <![CDATA[ ... ]]> block.=0A=
#=0A=
=0A=
    if {$newP} {=0A=
        set litS "<?rfc include=3D"=0A=
        set litT "?>"=0A=
    } else {=0A=
        set litS "%include."=0A=
        set litT ";"=0A=
    }=0A=
    set litN [string length $litS]=0A=
    set litO [string length $litT]=0A=
=0A=
    set data ""=0A=
    set fldata [list [list $inputF [set lineno 1] [numlines $stream]]]=0A=
    while {[set x [string first $litS $stream]] >=3D 0} {=0A=
        incr lineno [numlines [set initial \=0A=
                                   [string range $stream 0 [expr $x-1]]]]=0A=
        append data $initial=0A=
        set stream [string range $stream [expr $x+$litN] end]=0A=
        if {[set x [string first $litT $stream]] < 0} {=0A=
            error "missing close to %include.*"=0A=
        }=0A=
        set y [string range $stream 0 [expr $x-1]]=0A=
        if {$newP} {=0A=
            set y [string trim $y]=0A=
            if {[set quoteP [string first "'" $y]]} {=0A=
                regsub -- {^"([^"]*)"$} $y {\1} y=0A=
            } else {=0A=
                regsub -- {^'([^']*)'$} $y {\1} y=0A=
            }=0A=
        }=0A=
        if {![regexp -nocase -- {^[a-z0-9.-]+$} $y]} {=0A=
            error "invalid include $y"=0A=
        }=0A=
        set include ""=0A=
        foreach dir $path {=0A=
            if {(![file exists [set file [file join $dir $y]]]) \=0A=
                    && (![file exists [set file [file join $dir =
$y.xml]]])} {=0A=
                continue=0A=
            }=0A=
            set fd [open $file { RDONLY }]=0A=
            set include [read $fd]=0A=
            catch { close $fd }=0A=
            break=0A=
        }=0A=
        if {![string compare $include ""]} {=0A=
            error "unable to find external file $y.xml"=0A=
        }=0A=
=0A=
        set len [numlines $include]=0A=
        set flnew {}=0A=
        foreach fldatum $fldata {=0A=
            set end [lindex $fldatum 2]=0A=
            if {$end >=3D $lineno} {=0A=
                set fldatum [lreplace $fldatum 2 2 [expr $end+$len]]=0A=
            }=0A=
            lappend flnew $fldatum=0A=
        }=0A=
        set fldata $flnew=0A=
        lappend fldata [list $file $lineno $len]=0A=
=0A=
        set stream $include[string range $stream [expr $x+$litO] end]=0A=
    }=0A=
    append data $stream=0A=
=0A=
    return $data=0A=
}=0A=
=0A=
proc numlines {text} {=0A=
    set n [llength [split $text "\n"]]=0A=
    if {![string compare [string range $text end end] "\n"]} {=0A=
        incr n -1=0A=
    }=0A=
=0A=
    return $n=0A=
}=0A=
=0A=
proc around2fl {result} {=0A=
    global fldata=0A=
=0A=
    if {[regexp -nocase -- { around line ([1-9][0-9]*)} $result x =
lineno] \=0A=
            !=3D 1} {=0A=
        return $result=0A=
    }=0A=
=0A=
    set file ""=0A=
    set offset 0=0A=
    set max 0=0A=
    foreach fldatum $fldata {=0A=
        if {[set start [lindex $fldatum 1]] > $lineno} {=0A=
            break=0A=
        }=0A=
        if {[set new [expr $start+[set len [lindex $fldatum 2]]]] < =
$max} {=0A=
            continue=0A=
        }=0A=
=0A=
        if {$lineno <=3D $new} {=0A=
            set file [lindex $fldatum 0]=0A=
            set offset [expr $lineno-$start]=0A=
        } else {=0A=
            incr offset -$len=0A=
            set max $new=0A=
        }=0A=
    }=0A=
=0A=
    set tail " around line $offset"=0A=
    if {[string compare $file [lindex [lindex $fldata 0] 0]]} {=0A=
        append tail " in $file"=0A=
    }=0A=
    regsub " around line $lineno" $result $tail result=0A=
=0A=
    return $result=0A=
}=0A=
=0A=
proc xml_pass {tag {output ""}} {=0A=
    global counter depth elem elemN errorP passno stack stdout=0A=
=0A=
    switch -- $tag {=0A=
        start {=0A=
            catch { unset depth }=0A=
            array set depth [list bookinfo 0 list 0 note 0 section 0]=0A=
            set elemN 0=0A=
            set stack {}=0A=
            switch --  $passno {=0A=
                1 {=0A=
                    catch {unset counter }=0A=
                    catch {unset elem }=0A=
                    set errorP 0=0A=
                }=0A=
=0A=
                2 {=0A=
                    set stdout [open $output { WRONLY CREAT TRUNC }]=0A=
                }=0A=
            }=0A=
        }=0A=
=0A=
        end {=0A=
        }=0A=
    }=0A=
=0A=
}=0A=
=0A=
proc xml_begin {name {av {}}} {=0A=
    global counter depth elem elemN errorP passno stack stdout=0A=
=0A=
    incr elemN=0A=
=0A=
# because TclXML... quotes attribute values containing "]"=0A=
    set kv ""=0A=
    foreach {k v} $av {=0A=
        lappend kv $k=0A=
        regsub -all {\\\[} $v {[} v=0A=
        lappend kv $v=0A=
    }=0A=
    set av $kv=0A=
=0A=
    if {$elemN > 1} {=0A=
        set parent [lindex [lindex $stack end] 1]=0A=
        array set pv $elem($parent)=0A=
        lappend pv(.CHILDREN) $elemN=0A=
        set elem($parent) [array get pv]=0A=
    }=0A=
=0A=
    lappend stack [list $name [set elemX $elemN] $av]=0A=
=0A=
    if {$passno =3D=3D 1} {=0A=
        array set attrs $av=0A=
        array set attrs [list .NAME $name .CHILDREN {}]=0A=
        if {[lsearch -exact [list title organization \=0A=
                                  street city region code country \=0A=
                                  phone facsimile email uri \=0A=
                                  area workgroup keyword \=0A=
                                  xref eref seriesInfo] $name] >=3D 0} {=0A=
            set attrs(.PCDATA) ""=0A=
        }=0A=
        switch -- $name {=0A=
            list {=0A=
		if {![info exists attrs(style)]} {=0A=
		    set style empty=0A=
    =0A=
                    foreach frame [lrange $stack 0 end-1] {=0A=
                        if {[string compare [lindex $frame 0] list]} {=0A=
                            continue=0A=
                        }=0A=
                        set elemY [lindex $frame 1]=0A=
                        array set pv $elem($elemY)=0A=
        =0A=
			set style $pv(style)=0A=
                    }=0A=
=0A=
		    set attrs(style) $style=0A=
                }=0A=
=0A=
		if {![string first "format " $attrs(style)]} {=0A=
		    set format [string trimleft \=0A=
				       [string range $attrs(style) 7 end]]=0A=
		    set attrs(style) hanging=0A=
		    if {([string compare [set attrs(format) $format] ""]) \=0A=
			    && (![info exists counter($format)])} {=0A=
			set counter($format) 0=0A=
		    }=0A=
		} else {=0A=
		    set attrs(format) ""=0A=
		}=0A=
            }=0A=
=0A=
            t {=0A=
                if {![info exists attrs(hangText)]} {=0A=
		    set style ""=0A=
		    set format ""=0A=
    =0A=
                    foreach frame [lrange $stack 0 end-1] {=0A=
                        if {[string compare [lindex $frame 0] list]} {=0A=
                            continue=0A=
                        }=0A=
                        set elemY [lindex $frame 1]=0A=
                        array set pv $elem($elemY)=0A=
=0A=
			set style $pv(style)=0A=
			set format $pv(format)=0A=
                    }=0A=
		=0A=
		    if {[string compare $format ""]} {=0A=
			set attrs(hangText) \=0A=
			    [format $format [incr counter($format)]]=0A=
		    }=0A=
		}=0A=
	    }=0A=
	}=0A=
=0A=
        set elem($elemN) [array get attrs]=0A=
=0A=
        return=0A=
    }=0A=
=0A=
    if {([lsearch -exact [list front area workgroup keyword \=0A=
                               abstract note section \=0A=
                               t list figure preamble postamble \=0A=
                               xref eref iref vspace back] $name] >=3D =
0) \=0A=
            && ([lsearch0 $stack references] >=3D 0)} {=0A=
        return  =0A=
    }=0A=
=0A=
    array set attrs $elem($elemX)=0A=
=0A=
    switch -- $name {=0A=
        rfc {=0A=
            puts $stdout \=0A=
                 "<!DOCTYPE book PUBLIC \"-//OASIS//DTD DocBook =
V3.1//EN\">"=0A=
            puts $stdout "<book>"=0A=
        }=0A=
=0A=
        front {=0A=
            incr depth(bookinfo)=0A=
            puts $stdout "<bookinfo>"=0A=
=0A=
            if {[lsearch0 $stack reference] >=3D 0} {=0A=
                set hitP 0=0A=
                foreach child [find_element seriesInfo =
$attrs(.CHILDREN)] {=0A=
                    array set sv $elem($child)=0A=
                    switch -- $sv(name) {=0A=
                        isbn - issn {=0A=
                            set hitP 1=0A=
                        }=0A=
                    }=0A=
                    unset sv=0A=
                }=0A=
                if {!$hitP} {=0A=
                    set attrs(.ORGNAME) ""=0A=
                    set elem($elemX) [array get attrs]=0A=
                }=0A=
            }=0A=
        }=0A=
=0A=
        title {=0A=
            if {[lsearch0 $stack reference] >=3D 0} {=0A=
                set reference [lindex [lindex $stack end-2] 1]=0A=
                array set rv $elem($reference)=0A=
                foreach child [find_element seriesInfo $rv(.CHILDREN)] {=0A=
                    array set sv $elem($child)=0A=
                    switch -- $sv(name) {=0A=
                        RFC {=0A=
                            set attrs(.PCDATA) \=0A=
                                "RFC $sv(value): $attrs(.PCDATA)"=0A=
                            break=0A=
                        }=0A=
                    }=0A=
                    unset sv=0A=
                }=0A=
            }=0A=
=0A=
            puts -nonewline $stdout "<title>"=0A=
            pcdata_sgml $attrs(.PCDATA)=0A=
            puts $stdout "</title>"=0A=
        }=0A=
=0A=
        author {=0A=
            if {[lsearch0 $stack reference] >=3D 0} {=0A=
                set reference [lindex [lindex $stack end-2] 1]=0A=
                array set rv $elem($reference)=0A=
            }=0A=
            set authorP 0=0A=
            set firstP 0=0A=
=0A=
            if {[info exists attrs(fullname)]} {=0A=
                if {([info exists attrs(surname)]) \=0A=
                        && ([string compare $attrs(fullname) \=0A=
                                    "$attrs(initials) $attrs(surname)"]) =
\=0A=
                        && ([set x [string last $attrs(surname) \=0A=
                                           $attrs(fullname)]] > 0)} {=0A=
                    set name [string range $attrs(fullname) 0 [expr =
$x-1]]=0A=
=0A=
                    if {[info exists attrs(initials)]} {=0A=
                        set i {}=0A=
                        foreach n [lrange [split $attrs(initials) .] 1 =
end-1] {=0A=
                            set i [linsert $i 0 $n]=0A=
                        }=0A=
                        foreach n $i {=0A=
                            if {[set x [string last "$n. " $name]] > 0} {=0A=
                                set name [string range $name 0 [expr =
$x-1]]=0A=
                            } else {=0A=
                                break=0A=
                            }=0A=
                        }=0A=
                    }=0A=
=0A=
                    if {([info exists attrs(initials)]) \=0A=
                            && ([string compare $attrs(initials) \=0A=
                                        [set name \=0A=
                                             [string trimright =
$name]]])} {=0A=
                        if {!$authorP} {=0A=
                            incr authorP=0A=
                            puts $stdout "<author>"=0A=
                        }=0A=
=0A=
                        incr firstP=0A=
                        puts -nonewline $stdout "<firstname>"=0A=
                        pcdata_sgml $name=0A=
                        puts $stdout "</firstname>"=0A=
                    }=0A=
                }=0A=
            }=0A=
=0A=
            if {(!$firstP) && ([info exists attrs(initials)])} {=0A=
                if {!$authorP} {=0A=
                    incr authorP=0A=
                    puts $stdout "<author>"=0A=
                }=0A=
                puts -nonewline $stdout "<othername role=3D\"initials\">"=0A=
                pcdata_sgml $attrs(initials)=0A=
                puts $stdout "</othername>"=0A=
            }=0A=
=0A=
            if {[info exists attrs(surname)]} {=0A=
                if {!$authorP} {=0A=
                    incr authorP=0A=
                    puts $stdout "<author>"=0A=
                }=0A=
                puts -nonewline $stdout "<surname>"=0A=
                pcdata_sgml $attrs(surname)=0A=
                puts $stdout "</surname>"=0A=
            }=0A=
=0A=
            foreach child [find_element organization $attrs(.CHILDREN)] {=0A=
                array set ov $elem($child)=0A=
                if {[set x [string last . $ov(.PCDATA)]] \=0A=
                        =3D=3D [expr [string length $ov(.PCDATA)]-1]} {=0A=
                    set ov(.PCDATA) [string range $ov(.PCDATA) 0 [expr =
$x-1]]=0A=
                }=0A=
                if {[lsearch0 $stack reference] >=3D 0} {=0A=
                    if {![info exists rv(.ORGNAME)]} {=0A=
                        set rv(.ORGNAME) $ov(.PCDATA)=0A=
                        set elem($reference) [array get rv]=0A=
                    }=0A=
                    break=0A=
                }=0A=
=0A=
                if {!$authorP} {=0A=
                    incr authorP=0A=
                    puts $stdout "<author>"=0A=
                }=0A=
                puts $stdout "<affiliation>"=0A=
=0A=
                puts -nonewline $stdout "<orgname>"=0A=
                pcdata_sgml $ov(.PCDATA)=0A=
                puts $stdout "</orgname>"=0A=
=0A=
                if {[info exists ov(abbrev)]} {=0A=
                    puts -nonewline $stdout "<shortaffil>"=0A=
                    pcdata_sgml $ov(abbrev)=0A=
                    puts $stdout "</shortaffil>"=0A=
                }=0A=
=0A=
                puts $stdout "</affiliation>"=0A=
                break=0A=
            }=0A=
=0A=
# street, city, region, code country=0A=
# phone, facsimile, email, uri=0A=
=0A=
            if {$authorP} {=0A=
                puts $stdout "</author>"=0A=
            }=0A=
        }=0A=
=0A=
        date {=0A=
            if {[lsearch0 $stack reference] >=3D 0} {=0A=
                set tag releaseinfo=0A=
            } else {=0A=
                set tag pubdate=0A=
            }=0A=
            if {[info exists attrs(year)]} {=0A=
                puts -nonewline $stdout "<$tag>"=0A=
                if {[info exists attrs(month)]} {=0A=
                    puts -nonewline $stdout "$attrs(month) "=0A=
                }=0A=
                puts $stdout "$attrs(year)</$tag>"=0A=
            }=0A=
=0A=
            if {$depth(bookinfo) > 0} {=0A=
                incr depth(bookinfo) -1=0A=
                puts $stdout "</bookinfo>"=0A=
            }=0A=
        }=0A=
=0A=
        area - workgroup - keyword {=0A=
        }=0A=
=0A=
        abstract {=0A=
            puts $stdout "<preface>"=0A=
            puts $stdout "<title>Abstract</title>"=0A=
        }=0A=
=0A=
        note {=0A=
            if {![string compare [string tolower $attrs(title)] =
dedication]} {=0A=
                puts $stdout "<dedication>"=0A=
                return=0A=
            }=0A=
=0A=
            if {$depth(note) > 0} {=0A=
                puts $stdout "<sect$depth(note)>"=0A=
            } else {=0A=
                puts $stdout "<preface>"=0A=
            }=0A=
            puts -nonewline $stdout "<title>"=0A=
            pcdata_sgml $attrs(title)=0A=
            puts $stdout "</title>"=0A=
=0A=
            incr depth(note)=0A=
        }=0A=
=0A=
        middle {=0A=
        }=0A=
=0A=
        section {=0A=
            if {$depth(section) > 0} {=0A=
                puts -nonewline $stdout "<sect$depth(section)"=0A=
            } elseif {[lsearch0 $stack back] >=3D 0} {=0A=
                puts $stdout "<appendix"=0A=
            } else {=0A=
                puts -nonewline $stdout "<chapter"=0A=
            }=0A=
            if {[info exists attrs(anchor)]} {=0A=
                av_sgml id $attrs(anchor)=0A=
                av_sgml xreflabel $attrs(title)=0A=
            }=0A=
            puts $stdout ">"=0A=
            puts -nonewline $stdout "<title>"=0A=
            pcdata_sgml $attrs(title)=0A=
            puts $stdout "</title>"=0A=
=0A=
            incr depth(section)=0A=
        }=0A=
=0A=
        t {=0A=
            if {[info exists attrs(hangText)]} {=0A=
                puts -nonewline $stdout "<varlistentry><term>"=0A=
                pcdata_sgml $attrs(hangText)=0A=
                puts $stdout "</term>"=0A=
            }=0A=
            if {[lsearch0 $stack list] >=3D 0} {=0A=
                puts $stdout "<listitem>"=0A=
            }=0A=
            puts $stdout "<para>"=0A=
        }=0A=
=0A=
        list {=0A=
            switch -- $attrs(style) {=0A=
                numbers {=0A=
                    puts $stdout "<orderedlist numeration=3D\"arabic\">"=0A=
                }=0A=
=0A=
                symbols {=0A=
                    puts $stdout "<itemizedlist>"=0A=
                }=0A=
=0A=
                hanging {=0A=
                    puts $stdout "<variablelist>"=0A=
                }=0A=
=0A=
                default {=0A=
                    error "list style empty"=0A=
                }=0A=
            }=0A=
=0A=
            incr depth(list)=0A=
        }=0A=
=0A=
        figure {=0A=
# handled in artwork...=0A=
        }=0A=
=0A=
        preamble {=0A=
            puts $stdout "<para>"=0A=
        }=0A=
=0A=
        artwork {=0A=
            set figure [lindex [lindex $stack end-1] 1]=0A=
            array set fv $elem($figure)=0A=
=0A=
            if {[info exists fv(title)]} {=0A=
                if {[info exists attrs(type)]} {=0A=
                    puts -nonewline $stdout "<example"=0A=
                } else {=0A=
                    puts -nonewline $stdout "<figure"=0A=
                }=0A=
                if {[info exists fv(anchor)]} {=0A=
                    av_sgml id $fv(anchor)=0A=
                    av_sgml xreflabel $fv(title)=0A=
                }=0A=
                puts $stdout ">"                =0A=
                puts -nonewline $stdout "<title>"=0A=
                pcdata_sgml $fv(title)=0A=
                puts $stdout "</title>"=0A=
            }=0A=
=0A=
            if {[info exists attrs(type)]} {=0A=
                puts $stdout "<$attrs(type)>"=0A=
            } else {=0A=
                puts $stdout "<screen>"=0A=
            }=0A=
        }=0A=
=0A=
        postamble {=0A=
            puts $stdout "<para>"=0A=
        }=0A=
=0A=
        xref {=0A=
            if {[string compare $attrs(.PCDATA) ""]} {=0A=
                pcdata_sgml "$attrs(.PCDATA) "=0A=
            }=0A=
            puts -nonewline $stdout " <xref "=0A=
            av_sgml linkend $attrs(target)=0A=
            puts -nonewline $stdout ">"                =0A=
        }=0A=
=0A=
        eref {=0A=
            if {[string compare $attrs(.PCDATA) ""]} {=0A=
                pcdata_sgml $attrs(.PCDATA)=0A=
                puts -nonewline $stdout " (<systemitem"=0A=
                av_sgml role $attrs(target)=0A=
                puts -nonewline $stdout "></systemitem>"=0A=
            } else {=0A=
                error "eref contains no pcdata"=0A=
            }=0A=
        }=0A=
=0A=
        iref {=0A=
        }=0A=
=0A=
        vspace {=0A=
        }=0A=
=0A=
        back {=0A=
        }=0A=
=0A=
        references {=0A=
            puts $stdout "<bibliography>"=0A=
            if {[info exists attrs(title)]} {=0A=
                puts -nonewline $stdout "<title>"=0A=
                pcdata_sgml $attrs(title)=0A=
                puts $stdout "</title>"=0A=
            } else {=0A=
                puts $stdout "<title>References</title>"=0A=
            }=0A=
        }=0A=
=0A=
        reference {=0A=
            puts -nonewline $stdout "<biblioentry"=0A=
            if {[info exists attrs(anchor)]} {=0A=
                av_sgml id $attrs(anchor)=0A=
                av_sgml xreflabel $attrs(anchor)=0A=
            }=0A=
            puts $stdout ">"=0A=
        }=0A=
=0A=
        seriesInfo {=0A=
            set reference [lindex [lindex $stack end-1] 1]=0A=
            array set rv $elem($reference)=0A=
=0A=
            switch -- [set tag [string tolower $attrs(name)]] {=0A=
                isbn - issn {=0A=
                    puts $stdout "<$tag>$attrs(value)</$tag>"=0A=
                    if {[info exists rv(.ORGNAME)]} {=0A=
                        puts -nonewline $stdout =
"<publisher><publishername>"=0A=
                        pcdata_sgml $rv(.ORGNAME)=0A=
                        puts $stdout "</publishername></publisher>"=0A=
                    }=0A=
                }=0A=
=0A=
                rfc {=0A=
                }=0A=
=0A=
                internet-draft {=0A=
                }=0A=
            }=0A=
        }=0A=
    }=0A=
}=0A=
=0A=
proc xml_end {name} {=0A=
    global counter depth elem elemN errorP passno stack stdout=0A=
=0A=
    set frame [lindex $stack end]=0A=
    set stack [lreplace $stack end end]=0A=
=0A=
    if {$passno =3D=3D 1} {=0A=
        return=0A=
    }=0A=
=0A=
    if {([lsearch -exact [list front abstract note section \=0A=
                               t list figure preamble postamble \=0A=
                               xref eref iref vspace back] $name] >=3D =
0) \=0A=
            && ([lsearch0 $stack references] >=3D 0)} {=0A=
        return  =0A=
    }=0A=
=0A=
    set elemX [lindex $frame 1]=0A=
    array set attrs $elem($elemX)=0A=
=0A=
    switch -- $name {=0A=
        rfc {=0A=
            puts $stdout "</book>"=0A=
        }=0A=
=0A=
        front {=0A=
            if {$depth(bookinfo) > 0} {=0A=
                incr depth(bookinfo) -1=0A=
                puts $stdout "</bookinfo>"=0A=
            }=0A=
        }=0A=
=0A=
        title {=0A=
        }=0A=
=0A=
        author {=0A=
        }=0A=
=0A=
        date {=0A=
        }=0A=
=0A=
        area - workgroup - keyword {=0A=
        }=0A=
=0A=
        abstract {=0A=
            puts $stdout "</preface>"=0A=
        }=0A=
=0A=
        note {=0A=
            if {![string compare [string tolower $attrs(title)] =
dedication]} {=0A=
                puts $stdout "</dedication>"=0A=
                return=0A=
            }=0A=
=0A=
            incr depth(note) -1=0A=
=0A=
            if {$depth(note) > 0} {=0A=
                puts $stdout "</sect$depth(note)>"=0A=
            } else {=0A=
                puts $stdout "</preface>"=0A=
            }=0A=
        }=0A=
=0A=
        middle {=0A=
        }=0A=
=0A=
        section {=0A=
            incr depth(section) -1=0A=
=0A=
            if {$depth(section) > 0} {=0A=
                puts $stdout "</sect$depth(section)>"=0A=
            } elseif {[lsearch0 $stack back] >=3D 0} {=0A=
                puts $stdout "</appendix>"=0A=
            } else {=0A=
                puts $stdout "</chapter>"=0A=
            }=0A=
        }=0A=
=0A=
        t {=0A=
            puts $stdout ""=0A=
            puts $stdout "</para>"=0A=
            if {[lsearch0 $stack list] >=3D 0} {=0A=
                puts $stdout "</listitem>"=0A=
            }=0A=
            if {[info exists attrs(hangText)]} {=0A=
                puts $stdout "</varlistentry>"=0A=
            }=0A=
        }=0A=
=0A=
        list {=0A=
            incr depth(list) -1=0A=
=0A=
            switch -- $attrs(style) {=0A=
                numbers {=0A=
                    puts $stdout "</orderedlist>"=0A=
                }=0A=
=0A=
                symbols {=0A=
                    puts $stdout "</itemizedlist>"=0A=
                }=0A=
=0A=
                hanging {=0A=
                    puts $stdout "</variablelist>"=0A=
                }=0A=
=0A=
                default {=0A=
                }=0A=
            }=0A=
        }=0A=
=0A=
        figure {=0A=
# handled in artwork...=0A=
        }=0A=
=0A=
        preamble {=0A=
            puts $stdout ""=0A=
            puts $stdout "</para>"=0A=
        }=0A=
=0A=
        artwork {=0A=
            set figure [lindex [lindex $stack end] 1]=0A=
            array set fv $elem($figure)=0A=
=0A=
            if {[info exists attrs(type)]} {=0A=
                puts $stdout "</$attrs(type)>"=0A=
            } else {=0A=
                puts $stdout "</screen>"=0A=
            }=0A=
            if {[info exists fv(title)]} {=0A=
                if {[info exists attrs(type)]} {=0A=
                    puts -nonewline $stdout "</example>"=0A=
                } else {=0A=
                    puts -nonewline $stdout "</figure>"=0A=
                }=0A=
            }=0A=
        }=0A=
=0A=
        postamble {=0A=
            puts $stdout ""=0A=
            puts $stdout "</para>"=0A=
        }=0A=
=0A=
        xref {=0A=
        }=0A=
=0A=
        eref {=0A=
        }=0A=
=0A=
        iref {=0A=
        }=0A=
=0A=
        vspace {=0A=
        }=0A=
=0A=
        back {=0A=
        }=0A=
=0A=
        references {=0A=
            puts $stdout "</bibliography>"=0A=
        }=0A=
=0A=
        reference {=0A=
            puts $stdout "</biblioentry>"=0A=
        }=0A=
=0A=
        seriesInfo {=0A=
        }=0A=
    }=0A=
}=0A=
=0A=
proc xml_pcdata {text} {=0A=
    global counter depth elem elemN errorP passno stack stdout=0A=
=0A=
    if {[string length [set chars [string trim $text]]] <=3D 0} {=0A=
        return=0A=
    }=0A=
=0A=
    regsub -all "\r" $text "\n" text=0A=
=0A=
    set frame [lindex $stack end]=0A=
=0A=
    if {$passno =3D=3D 1} {=0A=
        set elemX [lindex $frame 1]=0A=
        array set attrs $elem($elemX)=0A=
        if {[info exists attrs(.PCDATA)]} {=0A=
            append attrs(.PCDATA) $chars=0A=
            set elem($elemX) [array get attrs]=0A=
        }=0A=
=0A=
        return=0A=
    }=0A=
=0A=
    if {[lsearch0 $stack references] >=3D 0} {=0A=
        return=0A=
    }=0A=
=0A=
    switch -- [lindex $frame 0] {=0A=
        artwork {=0A=
            set pre 1=0A=
        }=0A=
=0A=
        t=0A=
            -=0A=
        preamble=0A=
            -=0A=
        postamble {=0A=
            set pre 0=0A=
        }=0A=
=0A=
        default {=0A=
            return=0A=
        }=0A=
    }=0A=
=0A=
    pcdata_sgml $text $pre=0A=
}=0A=
=0A=
proc av_sgml {k v} {=0A=
    global counter depth elem elemN errorP passno stack stdout=0A=
=0A=
    regsub -all {"} $v {\&quot;} v=0A=
=0A=
    puts -nonewline $stdout " $k=3D\"$v\""=0A=
}=0A=
=0A=
proc pcdata_sgml {text {pre 0}} {=0A=
    global counter depth elem elemN errorP passno stack stdout=0A=
=0A=
    if {$pre} {=0A=
        puts $stdout $text=0A=
        return=0A=
    }=0A=
=0A=
    foreach {ei begin end} [list *   <emphasis>        </emphasis> \=0A=
                                 '   <literal>         </literal>  \=0A=
                                 {"} <computeroutput>  =
</computeroutput>] {=0A=
        set body ""=0A=
        while {[set x [string first "|$ei" $text]] >=3D 0} {=0A=
            if {$x > 0} {=0A=
                append body [string range $text 0 [expr $x-1]]=0A=
            }=0A=
            append body "$begin"=0A=
            set text [string range $text [expr $x+2] end]=0A=
            if {[set x [string first "|" $text]] < 0} {=0A=
                error "missing close for |$ei"=0A=
            }=0A=
            if {$x > 0} {=0A=
                append body [string range $text 0 [expr $x-1]]=0A=
            }=0A=
            append body "$end"=0A=
            set text [string range $text [expr $x+1] end]=0A=
        }=0A=
        append body $text=0A=
        set text $body=0A=
    }=0A=
=0A=
    regsub -all -nocase {&apos;} $text {'} text=0A=
    regsub -all -nocase {&quot;} $text {"} text=0A=
    regsub -all -nocase {&#151;} $text {\&mdash;} text=0A=
=0A=
    puts -nonewline $stdout $text=0A=
}=0A=
=0A=
proc lsearch0 {list exact} {=0A=
    set x 0=0A=
    foreach elem $list {=0A=
        if {![string compare [lindex $elem 0] $exact]} {=0A=
            return $x=0A=
        }=0A=
        incr x=0A=
    }=0A=
=0A=
    return -1=0A=
}=0A=
=0A=
proc find_element {name children} {=0A=
    global counter depth elemN elem passno stack xref=0A=
=0A=
    set result ""=0A=
    foreach child $children {=0A=
        array set attrs $elem($child)=0A=
=0A=
        if {![string compare $attrs(.NAME) $name]} {=0A=
            lappend result $child=0A=
        }=0A=
    }=0A=
=0A=
    return $result=0A=
}=0A=
=0A=
proc unexpected {args} {=0A=
    global errorP=0A=
=0A=
    set text [join [lrange $args 1 end] " "]=0A=
=0A=
    set errorP 1=0A=
    return -code error $text=0A=
}=0A=
=0A=
=0A=
#=0A=
# tclsh/wish linkage=0A=
#=0A=
=0A=
=0A=
global guiP=0A=
if {[info exists guiP]} {=0A=
    return=0A=
}=0A=
set guiP 0=0A=
if {![info exists tk_version]} {=0A=
    if {$tcl_interactive} {=0A=
        set guiP -1=0A=
        puts stdout ""=0A=
        puts stdout "invoke as \"xml2sgml input-file output-file\""=0A=
    }=0A=
} elseif {[llength $argv] > 0} {=0A=
    switch -- [llength $argv] {=0A=
        2 {=0A=
            set file [lindex $argv 1]=0A=
            if {![string compare $tcl_platform(platform) windows]} {=0A=
                set f ""=0A=
                foreach c [split $file ""] {=0A=
                    switch -- $c {=0A=
                        "\\" { append f "\\\\" }=0A=
=0A=
                        "\a" { append f "\\a" }=0A=
=0A=
                        "\b" { append f "\\b" }=0A=
=0A=
                        "\f" { append f "\\f" }=0A=
=0A=
                        "\n" { append f "\\n" }=0A=
=0A=
                        "\r" { append f "\\r" }=0A=
=0A=
                        "\v" { append f "\\v" }=0A=
=0A=
                        default {=0A=
                            append f $c=0A=
                        }=0A=
                    }=0A=
                }=0A=
                set file $f=0A=
            }=0A=
=0A=
            eval [file tail [file rootname [lindex $argv 0]]] $file=0A=
        }=0A=
=0A=
        3 {=0A=
            xml2sgml [lindex $argv 1] [lindex $argv 2]=0A=
        }=0A=
    }=0A=
=0A=
    exit 0=0A=
} else {=0A=
    set guiP 1=0A=
=0A=
    proc convert {w} {=0A=
        if {![string compare [set input [.input.ent get]] ""]} {=0A=
            tk_dialog .error "xml2sgml: oops!" "no input filename =
specified" \=0A=
                      error 0 OK=0A=
            return=0A=
        }=0A=
        set output [.output.ent get]=0A=
=0A=
        if {[catch { xml2sgml $input $output } result]} {=0A=
            tk_dialog .error "xml2sgml: oops!" $result error 0 OK=0A=
        }=0A=
    }=0A=
=0A=
    proc fileDialog {w ent operation} {=0A=
        set input {=0A=
            {"XML files"                .xml                    }=0A=
            {"All files"                *                       }=0A=
        }=0A=
        set output {=0A=
            {"SGML files"               .sgml                   }=0A=
        }=0A=
        if {![string compare $operation "input"]} {=0A=
            set file [tk_getOpenFile -filetypes $input -parent $w]=0A=
        } else {=0A=
            if {[catch { set input [.input.ent get] }]} {=0A=
                set input Untitled=0A=
            } else {=0A=
                set input [file rootname $input]=0A=
            }=0A=
            set file [tk_getSaveFile -filetypes $output -parent $w \=0A=
                            -initialfile $input -defaultextension .txt]=0A=
        }=0A=
        if [string compare $file ""] {=0A=
            $ent delete 0 end=0A=
            $ent insert 0 $file=0A=
            $ent xview end=0A=
        }=0A=
    }=0A=
=0A=
    eval destroy [winfo child .]=0A=
=0A=
    wm title . xml2sgml=0A=
    wm iconname . xml2sgml=0A=
    wm geometry . +300+300=0A=
=0A=
    label .msg -font "Helvetica 14" -wraplength 4i -justify left \=0A=
          -text "Convert XML (rfc2629) to SGML (docbook)"=0A=
    pack .msg -side top=0A=
=0A=
    frame .buttons=0A=
    pack .buttons -side bottom -fill x -pady 2m=0A=
    pack \=0A=
        [button .buttons.code -text Convert -command "convert ."] \=0A=
        [button .buttons.dismiss -text Quit -command "destroy ."] \=0A=
        -side left -expand 1=0A=
    =0A=
    foreach i {input output} {=0A=
        set f [frame .$i]=0A=
        label $f.lab -text "Select $i file: " -anchor e -width 20=0A=
        entry $f.ent -width 20=0A=
        button $f.but -text "Browse ..." -command "fileDialog . $f.ent =
$i"=0A=
        pack $f.lab -side left=0A=
        pack $f.ent -side left -expand yes -fill x=0A=
        pack $f.but -side left=0A=
        pack $f -fill x -padx 1c -pady 3=0A=
    }=0A=
}=0A=

------=_NextPart_000_00B8_01C178CC.15DA15C0--



From: Marc.Blanchet@viagenie.qc.ca (Marc Blanchet)
Date: Thu, 29 Nov 2001 12:56:32 -0500
Subject: [xml2rfc] different dictionaries
In-Reply-To: <0a1f01c178fd$73ae8240$fe0aa840@FATORA>
References: <280640000.1007048125@classic> <0a1f01c178fd$73ae8240$fe0aa840@FATORA>
Message-ID: <340970000.1007056592@classic>

-- jeudi, novembre 29, 2001 09:43:43 -0800 "Marshall T. Rose" 
<mrose+mtr.netnews@dbc.mtview.ca.us> wrote/a écrit:

>> I would
>> suggest to make a new definition of the RFC2629 which would be synched
> with > docbook. This would enables us to define internet-drafts/rfc as a
>> derivative of docbook and then be able to use all docbook utilities
>> available.
>>
>> Any opinion?
>>
>> mtr, I'm sure you thank about it, what were the pros/cons?
>
> the short answer is "you'll regret it".
>
> there's a reason why 2629 started from scratch instead of just doing a
> subset of docbook.
>
> docbook is great as the all-purpose, all-inclusive solution. it is
> absolutely awful as the basis for an entry-level person trying to do
> simple things.

awful might be. more complex, sure it is.

>
> there was/is a considerable amount of friction generated by putting xml
> into the rfc space. it takes, on average, 3 months to convince an
> experienced rfc writer that they should try to use the 2629 instead of
> nroff or emacs. and i still get complaints about having to match
> begin/end tags.

well, to me you need some editor to assist you in writing. that is a must.
I did start with templates which work out for simple things, but I 
eventually moved to use an editor which knows DTD and XML.
>
> anything that you do to make 2629 more complicated has the effect of
> increasing the cost of entry for the audience for which 2629 is intended.

agreed.

>
> if your problem is you have 2629 documents that you need to give to
> docbook folks, i'll give you a tcl script that i use that does a 1-way
> conversion.

I was thinking about this option too: having a two-way filter.

Yes I'm interested in you 1-way filter. (might be good to put on your 
xml2rfc web site for others).

(I may rewrite it in perl (more familiar to me than tcl) for 2-ways 
filtering... ;-)) I'll submit to the list when done.)

thanks,

Marc.

>
> /mtr
>



------------------------------------------
Marc Blanchet
Viagénie
tel: +1-418-656-9254x225

------------------------------------------
http://www.freenet6.net: IPv6 connectivity
------------------------------------------
http://www.normos.org: IETF(RFC,draft),
  IANA,W3C,... standards.
------------------------------------------


From: mrose+mtr.netnews@dbc.mtview.ca.us (Marshall T. Rose)
Date: Thu, 29 Nov 2001 09:43:43 -0800
Subject: [xml2rfc] different dictionaries
References: <280640000.1007048125@classic>
Message-ID: <0a1f01c178fd$73ae8240$fe0aa840@FATORA>

> I would
> suggest to make a new definition of the RFC2629 which would be synched
with > docbook. This would enables us to define internet-drafts/rfc as a
> derivative of docbook and then be able to use all docbook utilities
> available.
>
> Any opinion?
>
> mtr, I'm sure you thank about it, what were the pros/cons?

the short answer is "you'll regret it".

there's a reason why 2629 started from scratch instead of just doing a
subset of docbook.

docbook is great as the all-purpose, all-inclusive solution. it is
absolutely awful as the basis for an entry-level person trying to do simple
things.

there was/is a considerable amount of friction generated by putting xml into
the rfc space. it takes, on average, 3 months to convince an experienced rfc
writer that they should try to use the 2629 instead of nroff or emacs. and i
still get complaints about having to match begin/end tags.

anything that you do to make 2629 more complicated has the effect of
increasing the cost of entry for the audience for which 2629 is intended.

if your problem is you have 2629 documents that you need to give to docbook
folks, i'll give you a tcl script that i use that does a 1-way conversion.

/mtr




From: Marc.Blanchet@viagenie.qc.ca (Marc Blanchet)
Date: Thu, 29 Nov 2001 10:35:25 -0500
Subject: [xml2rfc] different dictionaries
Message-ID: <280640000.1007048125@classic>

Hi,
 I'm writing more and more documents using xml. internet-drafts (using 
RFc2629 dtd) and also articles, manpages, software documentation,  and 
books (essentially all using docbook, or derivatives of docbook (linux, 
freebsd for example). All docbook and derivatives share the same tag 
dictionnary, unless specific cases, which means that you are used to the 
same grammar, you use the same tools, etc... I think I'm not the only one!

The tag names for rfc2629 are different from docbook.

 without trying to start a debate on xml schemas and dictionaries, I would 
suggest to make a new definition of the RFC2629 which would be synched with 
docbook. This would enables us to define internet-drafts/rfc as a 
derivative of docbook and then be able to use all docbook utilities 
available.

Any opinion?

mtr, I'm sure you thank about it, what were the pros/cons?

Marc.

------------------------------------------
Marc Blanchet
Viagénie
tel: +1-418-656-9254x225

------------------------------------------
http://www.freenet6.net: IPv6 connectivity
------------------------------------------
http://www.normos.org: IETF(RFC,draft),
  IANA,W3C,... standards.
------------------------------------------


From: paf@cisco.com (=?ISO-8859-1?Q?Patrik_F=E4ltstr=F6m?=)
Date: Sun, 18 Nov 2001 19:36:01 +0100
Subject: [xml2rfc] "Network Working Group"
In-Reply-To: <049601c1705e$a5a5fc80$fe0aa840@FATORA>
References: <JIEGINCHMLABHJBIGKBCMEPKDGAA.julian.reschke@gmx.de> <5.1.0.14.2.20011115143309.03978278@joy.songbird.com> <4066152.1005917143@localhost> <032b01c16fa5$364d7f20$fe0aa840@FATORA> <2141817.1006049661@localhost> <03d201c16ff2$ebc883c0$fe0aa840@FATORA> <2587806.1006078414@localhost> <046601c17045$bb585ff0$fe0aa840@FATORA> <473212.1006103442@localhost> <049601c1705e$a5a5fc80$fe0aa840@FATORA>
Message-ID: <996394.1006112161@localhost>

--On 2001-11-18 10.27 -0800 "Marshall T. Rose"
<mrose+mtr.netnews@dbc.mtview.ca.us> wrote:

>> Ok. Doesn't work though:
> 
> well, perhaps another mac person can figure it out... as long as you can
> run the thing from tclsh...

This is _really_ weird, because I am running tcl etc in the Unix
environment. I.e. remember that MacOSX is a FreeBSD binding on top of a CMU
Mach.

> ps: of course, you can always write a shell script that invokes it the way
> you'd like, e.g.,
> 
>     #!/bin/sh
> 
>     ( echo source xml2rfc.tcl ; echo xml2rfc $1 ; echo exit ) | tclsh

:-)

Good point!

   paf



From: mrose+mtr.netnews@dbc.mtview.ca.us (Marshall T. Rose)
Date: Sun, 18 Nov 2001 10:27:14 -0800
Subject: [xml2rfc] "Network Working Group"
References: <JIEGINCHMLABHJBIGKBCMEPKDGAA.julian.reschke@gmx.de> <5.1.0.14.2.20011115143309.03978278@joy.songbird.com> <4066152.1005917143@localhost> <032b01c16fa5$364d7f20$fe0aa840@FATORA> <2141817.1006049661@localhost> <03d201c16ff2$ebc883c0$fe0aa840@FATORA> <2587806.1006078414@localhost> <046601c17045$bb585ff0$fe0aa840@FATORA> <473212.1006103442@localhost>
Message-ID: <049601c1705e$a5a5fc80$fe0aa840@FATORA>

> Ok. Doesn't work though:

well, perhaps another mac person can figure it out... as long as you can run
the thing from tclsh...

/mtr

ps: of course, you can always write a shell script that invokes it the way
you'd like, e.g.,

    #!/bin/sh

    ( echo source xml2rfc.tcl ; echo xml2rfc $1 ; echo exit ) | tclsh




From: paf@cisco.com (=?ISO-8859-1?Q?Patrik_F=E4ltstr=F6m?=)
Date: Sun, 18 Nov 2001 17:10:42 +0100
Subject: [xml2rfc] "Network Working Group"
In-Reply-To: <046601c17045$bb585ff0$fe0aa840@FATORA>
References: <JIEGINCHMLABHJBIGKBCMEPKDGAA.julian.reschke@gmx.de> <5.1.0.14.2.20011115143309.03978278@joy.songbird.com> <4066152.1005917143@localhost> <032b01c16fa5$364d7f20$fe0aa840@FATORA> <2141817.1006049661@localhost> <03d201c16ff2$ebc883c0$fe0aa840@FATORA> <2587806.1006078414@localhost> <046601c17045$bb585ff0$fe0aa840@FATORA>
Message-ID: <473212.1006103442@localhost>

--On 2001-11-18 07.28 -0800 "Marshall T. Rose"
<mrose+mtr.netnews@dbc.mtview.ca.us> wrote:

> also, you really should change this:
> 
>> zx81>head /usr/local/bin/xml2rfc
>> # !/sw/bin/tclsh
>> # the next line restarts using wish \
>> # exec tclsh "$0" "$0" "$@"
> 
> back to this:
> 
>> zx81>head /usr/local/bin/xml2rfc 
>> # !/bin/sh
>> # the next line restarts using wish \
>> exec tclsh "$0" "$0" "$@"

Ok. Doesn't work though:

zx81>which xml2rfc
/usr/local/bin/xml2rfc
zx81>sudo ed /usr/local/bin/xml2rfc
Password:
139527
1
#!/sw/bin/tclsh
s!/sw/bin/tclsh!/bin/sh!
p
#!/bin/sh
/tclsh
#exec tclsh "$0" "$0" "$@"
s/#//
p
exec tclsh "$0" "$0" "$@"
w
139520
q
zx81>cd Documents/IETF\ Papers/
zx81>xml2rfc sorting.xml sorting.txt
zx81>ls -l sorting*
-rwxrwxrwx  1 paf  unknown  11359 Nov 14 23:04 sorting.xml*
-rwxrwxrwx  1 paf  unknown  11387 Nov 14 22:53 sorting.xml~*
zx81>

     paf



From: mrose+mtr.netnews@dbc.mtview.ca.us (Marshall T. Rose)
Date: Sun, 18 Nov 2001 07:28:53 -0800
Subject: [xml2rfc] "Network Working Group"
References: <JIEGINCHMLABHJBIGKBCMEPKDGAA.julian.reschke@gmx.de> <5.1.0.14.2.20011115143309.03978278@joy.songbird.com> <4066152.1005917143@localhost> <032b01c16fa5$364d7f20$fe0aa840@FATORA> <2141817.1006049661@localhost> <03d201c16ff2$ebc883c0$fe0aa840@FATORA> <2587806.1006078414@localhost>
Message-ID: <046601c17045$bb585ff0$fe0aa840@FATORA>

> I.e. ...that worked...

goo.

also, you really should change this:

> zx81>head /usr/local/bin/xml2rfc
> #!/sw/bin/tclsh
> # the next line restarts using wish \
> #exec tclsh "$0" "$0" "$@"

back to this:

> zx81>head /usr/local/bin/xml2rfc 
> #!/bin/sh
> # the next line restarts using wish \
> exec tclsh "$0" "$0" "$@"

/mtr




From: paf@cisco.com (=?ISO-8859-1?Q?Patrik_F=E4ltstr=F6m?=)
Date: Sun, 18 Nov 2001 10:13:34 +0100
Subject: [xml2rfc] "Network Working Group"
In-Reply-To: <03d201c16ff2$ebc883c0$fe0aa840@FATORA>
References: <JIEGINCHMLABHJBIGKBCMEPKDGAA.julian.reschke@gmx.de> <5.1.0.14.2.20011115143309.03978278@joy.songbird.com> <4066152.1005917143@localhost> <032b01c16fa5$364d7f20$fe0aa840@FATORA> <2141817.1006049661@localhost> <03d201c16ff2$ebc883c0$fe0aa840@FATORA>
Message-ID: <2587806.1006078414@localhost>

--On 01-11-17 21.36 -0800 "Marshall T. Rose"
<mrose+mtr.netnews@dbc.mtview.ca.us> wrote:

> 1. from what you sent, it looks like you have tcl running and you have put
> TclXML under /sw/lib/tcl8.3/TclXML-1.1.1/
> 
> that's good.

Ok

> 2. when you do
> 
>> zx81>tclsh
>> % source xml2rfc.tcl
>> 
>> invoke as "xml2rfc   input-file output-file"
>>        or "xml2txt   input-file"
>>        or "xml2html  input-file"
>>        or "xml2nroff input-file"
>> % ^C
> 
> instead of typing ^C, why not type
> 
>     % xml2txt example.xml
> 
> where "example.xml" is the name of your xml file. it should work, i.e.,
> there's no error here, it's telling you what commands you can type...

zx81>/usr/local/src/xml2rfc-1.8/xml2rfc.tcl 
Application initialization failed: no display name and no $DISPLAY
environment variable
zx81>
zx81>
zx81>tclsh
% /usr/local/src/xml2rfc-1.8/xml2rfc.tcl
Application initialization failed: no display name and no $DISPLAY
environment variable
% source /usr/local/src/xml2rfc-1.8/xml2rfc.tcl

invoke as "xml2rfc   input-file output-file"
       or "xml2txt   input-file"
       or "xml2html  input-file"
       or "xml2nroff input-file"
% xml2txt sorting.xml
pass 1...
pass 2...
% ^C
zx81>echo sorting.*
sorting.txt   sorting.xml   sorting.xml~  
zx81>head sorting.txt 


Network Working Group                                       P. Faltstrom
Internet-Draft                                         Cisco Systems Inc
Expires: May 15, 2002                                  November 14, 2001


                        Lookup, Search and Sort
                  draft-faltstrom-i18n-sorting-00.txt

I.e. ...that worked...

> 3. if you want to invoke xml2rfc directly from the command line and you
> don't have the windowing system that wish wants, change the third line
> 
>     exec wish "$0" "$0" "$@"
> 
> to
> 
>     exec tclsh "$0" "$0" "$@"
> 
> 
> you can then do something like this:
> 
>     % xml2rfc.tcl example.xml example.html

That didn't work though:

zx81>rm sorting.txt
zx81>head /usr/local/bin/xml2rfc 
#!/bin/sh
# the next line restarts using wish \
exec tclsh "$0" "$0" "$@"


#
# xml2rfc.tcl - convert technical memos written using XML to TXT/HTML/NROFF
#
# (c) 1998-01 Invisible Worlds, Inc.
#
zx81>/usr/local/bin/xml2rfc sorting.xml sorting.txt
zx81>ls -l sorting*
-rwxrwxrwx  1 paf  unknown  11359 Nov 14 23:04 sorting.xml*
-rwxrwxrwx  1 paf  unknown  11387 Nov 14 22:53 sorting.xml~*
zx81>

No error messages at all.

I also tried to change the program which is to parse the content of the
xml2rfc file:

zx81>head /usr/local/bin/xml2rfc
#!/sw/bin/tclsh
# the next line restarts using wish \
#exec tclsh "$0" "$0" "$@"


#
# xml2rfc.tcl - convert technical memos written using XML to TXT/HTML/NROFF
#
# (c) 1998-01 Invisible Worlds, Inc.
#
zx81>ls -l /sw/bin/tclsh
lrwxr-xr-x  1 root  admin  16 Nov 18 02:03 /sw/bin/tclsh@ ->
/sw/bin/tclsh8.3
zx81>ls -l /sw/bin/tclsh8.3 
-rwxr-xr-x  1 root  admin  9704 Nov 14 18:21 /sw/bin/tclsh8.3*
zx81>/usr/local/bin/xml2rfc
zx81>/usr/local/bin/xml2rfc sorting.xml sorting.txt
zx81>

That didn't work either.

> alternatively, you can do do
> 
>     % ln xml2rfc.tcl xml2html
>     % xml2html example

Ok, when the above works I will try this.

   paf -- which still think tcl is pure magic :-)




From: mrose+mtr.netnews@dbc.mtview.ca.us (Marshall T. Rose)
Date: Sat, 17 Nov 2001 21:36:06 -0800
Subject: [xml2rfc] "Network Working Group"
References: <JIEGINCHMLABHJBIGKBCMEPKDGAA.julian.reschke@gmx.de> <5.1.0.14.2.20011115143309.03978278@joy.songbird.com> <4066152.1005917143@localhost> <032b01c16fa5$364d7f20$fe0aa840@FATORA> <2141817.1006049661@localhost>
Message-ID: <03d201c16ff2$ebc883c0$fe0aa840@FATORA>

1. from what you sent, it looks like you have tcl running and you have put
TclXML under /sw/lib/tcl8.3/TclXML-1.1.1/

that's good.

2. when you do

> zx81>tclsh
> % source xml2rfc.tcl
>
> invoke as "xml2rfc   input-file output-file"
>        or "xml2txt   input-file"
>        or "xml2html  input-file"
>        or "xml2nroff input-file"
> % ^C

instead of typing ^C, why not type

    % xml2txt example.xml

where "example.xml" is the name of your xml file. it should work, i.e.,
there's no error here, it's telling you what commands you can type...


3. if you want to invoke xml2rfc directly from the command line and you
don't have the windowing system that wish wants, change the third line

    exec wish "$0" "$0" "$@"

to

    exec tclsh "$0" "$0" "$@"


you can then do something like this:

    % xml2rfc.tcl example.xml example.html

alternatively, you can do do

    % ln xml2rfc.tcl xml2html
    % xml2html example

/mtr




From: paf@cisco.com (=?ISO-8859-1?Q?Patrik_F=E4ltstr=F6m?=)
Date: Sun, 18 Nov 2001 02:14:21 +0100
Subject: [xml2rfc] "Network Working Group"
In-Reply-To: <032b01c16fa5$364d7f20$fe0aa840@FATORA>
References: <JIEGINCHMLABHJBIGKBCMEPKDGAA.julian.reschke@gmx.de> <5.1.0.14.2.20011115143309.03978278@joy.songbird.com> <4066152.1005917143@localhost> <032b01c16fa5$364d7f20$fe0aa840@FATORA>
Message-ID: <2141817.1006049661@localhost>

--On 2001-11-17 12.19 -0800 "Marshall T. Rose"
<mrose+mtr.netnews@dbc.mtview.ca.us> wrote:

> hi. let's start with some basic information:
> 
> 1. what system are you running on (e.g., win2k, linux, solaris)?

MacOSX 10.1

> 2.  with:
> 
>> (a) When doing source (like in the README.txt) and have the infile and
>> outfile as arguments inside tclsh, I get a complaint that arguments are
> not
>> valid.
> 
> exactly what commands do you type and what errors do you get?

See below.

Problem seems to be that the wish which I have installed require a
X-Windows display, which I don't have. Can I give an argument to wish to
NOT use the $DISPLAY variable, or can I edit the xml2rfc program to not use
X part of the library, or can I use tcl only and not tk, or...

Here is a session:

zx81>fink list | grep tcl
    tcltk           8.3.3-5     Tcl (Tool Command Language, pronounced
tick...
zx81>sudo fink install tcltk
Reading package info...
Information about 258 packages read.
pkg tcltk  version ###
pkg tcltk  version 8.3.3-5
The following package will be installed or updated:
 tcltk
dpkg -i
/sw/fink/dists/stable/main/binary-darwin-powerpc/languages/tcltk_8.3.3-5_da
rwin-powerpc.deb
Selecting previously deselected package tcltk.
(Reading database ... 12190 files and directories currently installed.)
Unpacking tcltk (from .../tcltk_8.3.3-5_darwin-powerpc.deb) ...
Setting up tcltk (8.3.3-5) ...

Done.
zx81>ls /sw/lib/tcl
tcl           tcl8.3        tclConfig.sh  
zx81>ls /sw/lib/tcl
/sw/lib/tcl@
zx81>ls /sw/lib/tcl8.3/
auto.tcl        http2.3/        msgcat1.1/      safe.tcl        word.tcl
encoding/       init.tcl        opt0.4/         tclAppInit.c
history.tcl     ldAix           package.tcl     tclIndex
http1.0/        ldAout.tcl      parray.tcl      tcltest1.0/
zx81>which tclsh
/sw/bin/tclsh
zx81>which wish
/sw/bin/wish
zx81>wish --help
Application initialization failed: no display name and no $DISPLAY
environment variable
%
zx81>pwd
/usr/local/src/xml2rfc-1.8
zx81>pushd /sw/lib/tcl8.3/
/sw/lib/tcl8.3 /usr/local/src/xml2rfc-1.8
zx81>ls
auto.tcl        http2.3/        msgcat1.1/      safe.tcl        word.tcl
encoding/       init.tcl        opt0.4/         tclAppInit.c
history.tcl     ldAix           package.tcl     tclIndex
http1.0/        ldAout.tcl      parray.tcl      tcltest1.0/
zx81>sudo tar xvzf /usr/local/src/xml2rfc-1.8/TclXML-1_1_1.tgz 
TclXML-1.1.1/
TclXML-1.1.1/changes
TclXML-1.1.1/sgml.tcl
TclXML-1.1.1/xml.tcl
TclXML-1.1.1/tests/
TclXML-1.1.1/tests/all
TclXML-1.1.1/tests/attribute.test
TclXML-1.1.1/tests/CDATA.test
TclXML-1.1.1/tests/comment.test
TclXML-1.1.1/tests/defs
TclXML-1.1.1/tests/doctype.test
TclXML-1.1.1/tests/element.test
TclXML-1.1.1/tests/entity.test
TclXML-1.1.1/tests/PCDATA.test
TclXML-1.1.1/tests/PI.test
TclXML-1.1.1/tests/README
TclXML-1.1.1/tests/xmltest.test
TclXML-1.1.1/pkgIndex.tcl
TclXML-1.1.1/docs/
TclXML-1.1.1/docs/reference.html
zx81>pushd
/usr/local/src/xml2rfc-1.8 /sw/lib/tcl8.3
zx81>head xml2rfc.tcl 
#!/bin/sh
# the next line restarts using wish \
exec wish "$0" "$0" "$@"


#
# xml2rfc.tcl - convert technical memos written using XML to TXT/HTML/NROFF
#
# (c) 1998-01 Invisible Worlds, Inc.
#
zx81>tclsh
% source xml2rfc.tcl

invoke as "xml2rfc   input-file output-file"
       or "xml2txt   input-file"
       or "xml2html  input-file"
       or "xml2nroff input-file"
% ^C                         
zx81>cd /Users/paf/Documents/IETF\ Papers/
zx81>tclsh
% source /usr/local/src/xml2rfc-1.8/xml2rfc.tcl

invoke as "xml2rfc   input-file output-file"
       or "xml2txt   input-file"
       or "xml2html  input-file"
       or "xml2nroff input-file"
% /usr/local/src/xml2rfc-1.8/xml2rfc.tcl
Application initialization failed: no display name and no $DISPLAY
environment variable
% source /usr/local/src/xml2rfc-1.8/xml2rfc.tcl sorting.xml
wrong # args: should be "source fileName"
% ^C
zx81>ls sorting.xml
sorting.xml*
zx81>ls -l sorting.xml
-rwxrwxrwx  1 paf  unknown  11359 Nov 14 23:04 sorting.xml*
zx81>tclsh
% /usr/local/src/xml2rfc-1.8/xml2rfc.tcl sorting.xml sorting.txt
Application initialization failed: no display name and no $DISPLAY
environment variable
% ^C
zx81>/usr/local/src/xml2rfc-1.8/xml2rfc.tcl sorting.xml sorting.txt 
Application initialization failed: no display name and no $DISPLAY
environment variable
zx81>tclsh
% /usr/local/src/xml2rfc-1.8/xml2rfc.tcl sorting.xml sorting.txt
Application initialization failed: no display name and no $DISPLAY
environment variable
% ^C
zx81>

    paf



From: mrose+mtr.netnews@dbc.mtview.ca.us (Marshall T. Rose)
Date: Sat, 17 Nov 2001 12:19:38 -0800
Subject: [xml2rfc] "Network Working Group"
References: <JIEGINCHMLABHJBIGKBCMEPKDGAA.julian.reschke@gmx.de> <5.1.0.14.2.20011115143309.03978278@joy.songbird.com> <4066152.1005917143@localhost>
Message-ID: <032b01c16fa5$364d7f20$fe0aa840@FATORA>

hi. let's start with some basic information:

1. what system are you running on (e.g., win2k, linux, solaris)?

2.  with:

> (a) When doing source (like in the README.txt) and have the infile and
> outfile as arguments inside tclsh, I get a complaint that arguments are
not
> valid.

exactly what commands do you type and what errors do you get?


> (b) When setting the 'x' bit on the xml2rfc itself, adding source commands
> for the sgml and xml libraries, I get complaints that $DISPLAY is not set.
> I presume that is because my wish want to have X-Windows, which I don't
> have, and xml2rfc exec's wish as first thing.

where did you copy the TclXML files to?

/mtr




From: mrose+mtr.netnews@dbc.mtview.ca.us (Marshall T. Rose)
Date: Sat, 17 Nov 2001 12:14:17 -0800
Subject: [xml2rfc] "Network Working Group"
References: <JIEGINCHMLABHJBIGKBCMEPKDGAA.julian.reschke@gmx.de> <5.1.0.14.2.20011115143309.03978278@joy.songbird.com>
Message-ID: <030501c16fa4$6fd7fc30$fe0aa840@FATORA>

> Nor does there seem to be a turnkey version of xml2rfc that installs on
> Windows 2000.
>
> By way of looking for greater use of this tool, it would be helpful to
have
> a version that installs directly, without requiring installing a cascading
> set of tools it depends on.

dave - it's just not that hard. if you look at the HTML version of the
README file, it's about 10 movements/clicks of the mouse to make things
happen.

1. click on the "scriptics website" link to get tcl 8:
    - click on "Download the stable version"
    - click on "binaries from ActiveState"
    - click on "download"
    - click on "Windows self-extracting"
    - save it/run it

2. copy the files from the TclXML 1.1.1 release to C:\Program
Files\...\TclXML-1.0\

3. we're done. didn't see anything cascading here.

yes, it would be nice if there was a single self-extracting executable that
did it all, but this just isn't that hard...

/mtr




From: dhc2@dcrocker.net (Dave Crocker)
Date: Sat, 17 Nov 2001 11:16:47 -0800
Subject: [xml2rfc] "Network Working Group"
In-Reply-To: <9BF66EBF6BEFD942915B4D4D45C051F338E7E0@DYN-TX-EXCH-001.dyn amicsoft.com>
Message-ID: <5.1.0.14.2.20011117111454.036394e8@joy.songbird.com>

At 05:24 PM 11/16/2001 -0500, Robert Sparks wrote:
>Dave - if you have the disk space for it, cygwin (available
>at RedHat) has everything needed to make xml2rfc go in a
>extremely unix-like subenvironment.

Thanks.

Oddly, what I would REALLY like is a Windows API over Unix.  That is, being 
able to run Windows applications over native Unix -- with no virtual 
machine.  It would provide the reliability and security of Unix, with the 
user-level interoperability of Windows apps.  The virtual machine approach 
has too much hassle and complexity.

d/


----------
Dave Crocker  <mailto:dcrocker@brandenburg.com>
Brandenburg InternetWorking  <http://www.brandenburg.com>
tel +1.408.246.8253;  fax +1.408.273.6464



From: ned.freed@mrochek.com (ned.freed@mrochek.com)
Date: Sat, 17 Nov 2001 10:39:37 -0800 (PST)
Subject: [xml2rfc] "Network Working Group"
In-Reply-To: "Your message dated Fri, 16 Nov 2001 13:25:44 -0800" <4066152.1005917143@localhost>
References: <JIEGINCHMLABHJBIGKBCMEPKDGAA.julian.reschke@gmx.de> <5.1.0.14.2.20011115143309.03978278@joy.songbird.com> <5.1.0.14.2.20011115143309.03978278@joy.songbird.com>
Message-ID: <01KAT3NNGI3S001H9E@mauve.mrochek.com>

> But, when I then try to run xml2rfc I can not get it to work.

I'm no expert on any of this, but the following works for me on MacOS 9:

(1) Install the TCL/TK 8.3.4.

(2) Get the TclCML 1.1.1 distribution.

(3) Create a folder in the "Tool Command Language" folder that was created in
    your "Extensions" folder in step (1). It can have any name you like.

(4) Move the files pkgIndex.tcl, sgml.tcl, and xml.tcl to this new folder.

(5) Drag the xml2rfc.tcl file onto the "Drag & Drop Tclets" application
    that was installed in step (1).

(6) When asked for an appropriate wish stub, select "Wish 8.3.4".

(7) The "Drap & Drop Tclets" application will write out an executable
    version of xml2rfc.

That's it!

				Ned


From: julian.reschke@gmx.de (Julian Reschke)
Date: Fri, 16 Nov 2001 23:26:48 +0100
Subject: [xml2rfc] "Network Working Group"
In-Reply-To: <5.1.0.14.2.20011116141112.021d8538@joy.songbird.com>
Message-ID: <JIEGINCHMLABHJBIGKBCKELCDHAA.julian.reschke@gmx.de>

> From: xml2rfc-admin@lists.xml.resource.org
> [mailto:xml2rfc-admin@lists.xml.resource.org]On Behalf Of Dave Crocker
> Sent: Friday, November 16, 2001 11:12 PM
> To: Patrik Fältström
> Cc: xml2rfc@lists.xml.resource.org
> Subject: Re: [xml2rfc] "Network Working Group"
>
>
> At 01:25 PM 11/16/2001 -0800, Patrik Fältström wrote:
> >...to continue on this theme...I am not normally using TCL, but
> I have both
> >tclsh and wish installed. So, I install the xml2rfc sowftare, and run the
>
> You, at least, are using a Unix.  Alas, I am not.  The sequence for
> bringing up xml2rfc on a non-development windows machine is
> somewhat beyond
> daunting.

Agreed.

That's why I usually just drop my documents in IE (and let the XSLT kick
in). If I need the txt or nroff version, I use the online service...



From: rsparks@dynamicsoft.com (Robert Sparks)
Date: Fri, 16 Nov 2001 17:24:26 -0500
Subject: [xml2rfc] "Network Working Group"
Message-ID: <9BF66EBF6BEFD942915B4D4D45C051F338E7E0@DYN-TX-EXCH-001.dynamicsoft.com>

Dave - if you have the disk space for it, cygwin (available
at RedHat) has everything needed to make xml2rfc go in a
extremely unix-like subenvironment.

I have a kitchen-sink install on one machine that comes
in at about 250M.

(besides, its fun to watch peoples heads melt when you
show them an X server running under cygwin running under
win2k (which happens to be running in a vmware virtual
machine hosted on a linux box at the time))

Marshall - do you want to start pulling together 
a "making xml2rfc run in environment <foo>" FaQ? 
(Maybe it already exists - i'm a version behind
I think).

RjS

> -----Original Message-----
> From: Dave Crocker [mailto:dhc2@dcrocker.net]
> Sent: Friday, November 16, 2001 4:12 PM
> To: Patrik Fältström
> Cc: xml2rfc@lists.xml.resource.org
> Subject: Re: [xml2rfc] "Network Working Group"
> 
> 
> At 01:25 PM 11/16/2001 -0800, Patrik Fältström wrote:
> >...to continue on this theme...I am not normally using TCL, 
> but I have both
> >tclsh and wish installed. So, I install the xml2rfc 
> sowftare, and run the
> 
> You, at least, are using a Unix.  Alas, I am not.  The sequence for 
> bringing up xml2rfc on a non-development windows machine is 
> somewhat beyond 
> daunting.
> 
> d/
> 
> 
> ----------
> Dave Crocker  <mailto:dcrocker@brandenburg.com>
> Brandenburg InternetWorking  <http://www.brandenburg.com>
> tel +1.408.246.8253;  fax +1.408.273.6464
> 
> _______________________________________________
> xml2rfc mailing list
> xml2rfc@lists.xml.resource.org
> http://lists.xml.resource.org/mailman/listinfo/xml2rfc
> 


From: dhc2@dcrocker.net (Dave Crocker)
Date: Fri, 16 Nov 2001 14:12:15 -0800
Subject: [xml2rfc] "Network Working Group"
In-Reply-To: <4066152.1005917143@localhost>
References: <5.1.0.14.2.20011115143309.03978278@joy.songbird.com> <JIEGINCHMLABHJBIGKBCMEPKDGAA.julian.reschke@gmx.de> <5.1.0.14.2.20011115143309.03978278@joy.songbird.com>
Message-ID: <5.1.0.14.2.20011116141112.021d8538@joy.songbird.com>

At 01:25 PM 11/16/2001 -0800, Patrik Fältström wrote:
>...to continue on this theme...I am not normally using TCL, but I have both
>tclsh and wish installed. So, I install the xml2rfc sowftare, and run the

You, at least, are using a Unix.  Alas, I am not.  The sequence for 
bringing up xml2rfc on a non-development windows machine is somewhat beyond 
daunting.

d/


----------
Dave Crocker  <mailto:dcrocker@brandenburg.com>
Brandenburg InternetWorking  <http://www.brandenburg.com>
tel +1.408.246.8253;  fax +1.408.273.6464



From: paf@cisco.com (=?ISO-8859-1?Q?Patrik_F=E4ltstr=F6m?=)
Date: Fri, 16 Nov 2001 13:25:44 -0800
Subject: [xml2rfc] "Network Working Group"
In-Reply-To: <5.1.0.14.2.20011115143309.03978278@joy.songbird.com>
References: <JIEGINCHMLABHJBIGKBCMEPKDGAA.julian.reschke@gmx.de> <5.1.0.14.2.20011115143309.03978278@joy.songbird.com>
Message-ID: <4066152.1005917143@localhost>

--On 2001-11-15 14.45 -0800 Dave Crocker <dhc2@dcrocker.net> wrote:

> Nor does there seem to be a turnkey version of xml2rfc that installs on
> Windows 2000.
> 
> By way of looking for greater use of this tool, it would be helpful to
> have a version that installs directly, without requiring installing a
> cascading set of tools it depends on.

...to continue on this theme...I am not normally using TCL, but I have both
tclsh and wish installed. So, I install the xml2rfc sowftare, and run the
tests according to the README.txt file, and after understanding that I
should uncompress the TCL libraries for sgml and xml somewhere and "source"
them, I manage to get the test output correct.

But, when I then try to run xml2rfc I can not get it to work.

One of these things happens:

(a) When doing source (like in the README.txt) and have the infile and
outfile as arguments inside tclsh, I get a complaint that arguments are not
valid.

(b) When setting the 'x' bit on the xml2rfc itself, adding source commands
for the sgml and xml libraries, I get complaints that $DISPLAY is not set.
I presume that is because my wish want to have X-Windows, which I don't
have, and xml2rfc exec's wish as first thing.

So, to conclude, I don't think I know enough about tcl to even make a
correct statement of the problem I have (as you can see above), but on the
other hand, I feel that I have made some progress, maybe in the wrong
direction, part from what is in the README.txt file.

Conclusion, I would also like the README.txt file be more specific on what
I am supposed to do _after_ being able to get the "usage text" when running
xml2rfc interactively inside tclsh.

    paf



From: mrose+mtr.netnews@dbc.mtview.ca.us (Marshall T. Rose)
Date: Thu, 15 Nov 2001 15:24:58 -0800
Subject: [xml2rfc] "Network Working Group"
References: <JIEGINCHMLABHJBIGKBCMEPKDGAA.julian.reschke@gmx.de> <5.1.0.14.2.20011115143309.03978278@joy.songbird.com>
Message-ID: <0d3401c16e2c$be375c00$fe0aa840@FATORA>

> I'm having no success finding the current address for the online xml2rfc
> "service".
...
> xml2rfc mailing list
> xml2rfc@lists.xml.resource.org
> http://lists.xml.resource.org/mailman/listinfo/xml2rfc

dave - i did the following, i clicked on the last link in the message you
sent where the the fourth line of the resulting page said:

> To find out more about xml2rfc, click here.

i clicked on that link and found the service in question...

/mtr




From: dhc2@dcrocker.net (Dave Crocker)
Date: Thu, 15 Nov 2001 14:45:11 -0800
Subject: [xml2rfc] "Network Working Group"
In-Reply-To: <07e301c16ad7$6878e1b0$fe0aa840@FATORA>
References: <JIEGINCHMLABHJBIGKBCMEPKDGAA.julian.reschke@gmx.de>
Message-ID: <5.1.0.14.2.20011115143309.03978278@joy.songbird.com>

I'd solve this myself if I could, but since that won't happen:

I'm having no success finding the current address for the online xml2rfc 
"service".

Nor does there seem to be a turnkey version of xml2rfc that installs on 
Windows 2000.

By way of looking for greater use of this tool, it would be helpful to have 
a version that installs directly, without requiring installing a cascading 
set of tools it depends on.

d/

----------
Dave Crocker  <mailto:dcrocker@brandenburg.com>
Brandenburg InternetWorking  <http://www.brandenburg.com>
tel +1.408.246.8253;  fax +1.408.273.6464



From: mrose@dbc.mtview.ca.us (Marshall T. Rose)
Date: Sun, 11 Nov 2001 09:36:28 -0800
Subject: [xml2rfc] "Network Working Group"
References: <JIEGINCHMLABHJBIGKBCMEPKDGAA.julian.reschke@gmx.de>
Message-ID: <07e301c16ad7$6878e1b0$fe0aa840@FATORA>

> Question: is any of the metadata elements (2.2.4) such as <workgroup>
> supposed to show up in the headers?

nope.

/mtr




From: julian.reschke@gmx.de (Julian Reschke)
Date: Sun, 11 Nov 2001 13:51:52 +0100
Subject: [xml2rfc] "Network Working Group"
In-Reply-To: <017101c168bf$e3230590$fe0aa840@FATORA>
Message-ID: <JIEGINCHMLABHJBIGKBCMEPKDGAA.julian.reschke@gmx.de>

OK,

I just added this PI to my rfc2629.xslt (will be made available tomorrow on
<http://greenbytes.de/tech/webdav>).

Question: is any of the metadata elements (2.2.4) such as <workgroup>
supposed to show up in the headers?

Julian

> -----Original Message-----
> From: xml2rfc-admin@lists.xml.resource.org
> [mailto:xml2rfc-admin@lists.xml.resource.org]On Behalf Of Marshall T.
> Rose
> Sent: Friday, November 09, 2001 2:43 AM
> To: xml2rfc@lists.xml.resource.org; Michael Richardson
> Cc: Marshall Rose
> Subject: Re: [xml2rfc] "Network Working Group"
>
>
> >   No matter what I put into <area> and <workgroup> in the fornt
> matter, I
> > get:
> >
> > Network Working Group                                      M. Richardson
> > ^^^^^^^^^^^^^^^^^^^^^
>
> yes, that's a constant string you find in all rfcs/i-ds.
>
> when people want to do things other than rfcs/i-ds, they use
>
>     <?rfc private='string'?>
>
> to get 'string' instead.
>
> /mtr
>
>
> _______________________________________________
> xml2rfc mailing list
> xml2rfc@lists.xml.resource.org
> http://lists.xml.resource.org/mailman/listinfo/xml2rfc
>



From: mrose+mtr.netnews@dbc.mtview.ca.us (Marshall T. Rose)
Date: Thu, 8 Nov 2001 17:43:09 -0800
Subject: [xml2rfc] "Network Working Group"
References: <200111082014.fA8KEcU07989@marajade.sandelman.ottawa.on.ca>
Message-ID: <017101c168bf$e3230590$fe0aa840@FATORA>

>   No matter what I put into <area> and <workgroup> in the fornt matter, I
> get:
> 
> Network Working Group                                      M. Richardson
> ^^^^^^^^^^^^^^^^^^^^^

yes, that's a constant string you find in all rfcs/i-ds.

when people want to do things other than rfcs/i-ds, they use

    <?rfc private='string'?>

to get 'string' instead.

/mtr




From: mcr@sandelman.ottawa.on.ca (Michael Richardson)
Date: Thu, 08 Nov 2001 15:14:38 -0500
Subject: [xml2rfc] "Network Working Group"
Message-ID: <200111082014.fA8KEcU07989@marajade.sandelman.ottawa.on.ca>

  No matter what I put into <area> and <workgroup> in the fornt matter, I
get:

Network Working Group                                      M. Richardson
^^^^^^^^^^^^^^^^^^^^^

  at the top.

This is with version 1.8.

I have the following <front> matter:


<?xml version="1.0"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd">
<?rfc toc="yes"?>

<rfc ipr="full2026" docName="draft-richardson-ipsec-opportunistic-03.txt">

<front>
  <area>Security</area>
  <workgroup>Independant submission</workgroup>
  <title abbrev="opportunistic">
     A method for doing opportunistic encryption with IKE
  </title>

  <author initials="M." surname="Richardson" fullname="Michael C. Richardson">
    <organization abbrev="SSW">Sandelman Software Works</organization>
    <address>
      <postal>   
        <street>470 Dawson Avenue</street>
        <city>Ottawa</city>
        <region>ON</region>
        <code>K1Z 5V7</code>
        <country>CA</country>
      </postal>
      <email>mcr@sandelman.ottawa.on.ca</email>
      <uri>http://www.sandelman.ottawa.on.ca/</uri>
    </address>
  </author>

  <author initials="D.H." surname="Redelmeier"
          fullname="D. Hugh Redelmeier">
    <organization abbrev="Mimosa">Mimosa</organization>
    <address>
      <postal>   
        <city>Toronto</city>
        <region>ON</region>
        <country>CA</country>
      </postal>
      <email>hugh@mimosa.com</email>
    </address>
  </author>

  <author initials="H." surname="Spencer"
          fullname="Henry Spencer">
    <organization abbrev="SP Systems">SP Systems</organization>
    <address>
      <postal>
      	<street>Box 280 Station A</street>
	<city>Toronto</city>
	<region>ON</region>
	<code>M5W 1B2</code>
	<country>Canada</country>
      </postal>
      <email>henry@spsystems.net</email>
    </address>
  </author>

  <date month="October" year="2001"></date>
</front>

