Changeset 799 for xml2rfc


Ignore:
Timestamp:
Apr 1, 2010, 12:49:35 AM (10 years ago)
Author:
julian.reschke@…
Message:

latest versions of rfc2629.xslt and xml2rfc.tcl, bump up document dates

Location:
xml2rfc
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • xml2rfc/rfc2629.dtd

    r723 r799  
    115115          iprExtract  IDREF              #IMPLIED
    116116          submissionType
    117                       (IETF|independent) "IETF"
     117                      (IETF|IAB|IRTF|independent) "IETF"
    118118          docName     %ATEXT;            #IMPLIED
    119119          xml:lang    %ATEXT;            "en">
  • xml2rfc/xml2rfc.tcl

    r723 r799  
    1212global prog prog_version prog_url prog_ack
    1313set prog "xml2rfc"
    14 set prog_version "v1.34"
     14set prog_version "v1.35"
    1515set prog_url "http://xml.resource.org/"
    1616set prog_ack \
     
    42334233
    42344234               {trust200902
    4235 "This Internet-Draft is submitted to IETF in full
     4235"This Internet-Draft is submitted %TOIETF% in full
    42364236conformance with the provisions of BCP 78 and BCP 79."}
    42374237
    42384238               {noModificationTrust200902
    4239 "This Internet-Draft is submitted to IETF in full
     4239"This Internet-Draft is submitted %TOIETF% in full
    42404240conformance with the provisions of BCP 78 and BCP 79.
    42414241This document may not be modified, and derivative works of it may
     
    42444244
    42454245               {noDerivativesTrust200902
    4246 "This Internet-Draft is submitted to IETF in full
     4246"This Internet-Draft is submitted %TOIETF% in full
    42474247conformance with the provisions of BCP 78 and BCP 79.
    42484248This document may not be modified, and derivative works of it may
     
    42504250
    42514251               {pre5378Trust200902
    4252 "This Internet-Draft is submitted to IETF in full
     4252"This Internet-Draft is submitted %TOIETF% in full
    42534253conformance with the provisions of BCP 78 and BCP 79.
    42544254This document may contain material from IETF Documents or IETF
     
    43464346                if {![catch { set attrs(submissionType) }]} {
    43474347                    switch -- $attrs(submissionType) {
    4348                         IETF - independent {}
     4348                        IETF - IRTF - IAB - independent {}
    43494349                        default {
    43504350                            unexpected error \
     
    53365336
    53375337"The limited permissions granted above are perpetual and will not be
    5338 revoked by the Internet Society or its successors or assignees."
     5338revoked by the Internet Society or its successors or assigns."
    53395339
    53405340"This document and the information contained herein is provided on an
     
    54915491the IETF Administrative Support Activity (IASA)."
    54925492
     5493
     5494# get the publication date in seconds; returns 0 when not available
     5495
     5496proc get_publication_date_seconds {date} {
     5497    global elem
     5498
     5499    array set dv $elem($date)
     5500
     5501    set three [clock format [clock seconds] -format "%B %Y %d"]
     5502
     5503    if {[catch { set dv(year) }]} {
     5504        set dv(year) [lindex $three 1]
     5505    }
     5506    if {[catch { set dv(month) }]} {
     5507        if {(![string compare $dv(year) [lindex $three 1]])} {
     5508            set dv(month) [lindex $three 0]
     5509            set dv(day) [string trimleft [lindex $three 2] 0]
     5510        } else {
     5511            unexpected error "I can't synthesize a date in $dv(year)"
     5512        }
     5513    } elseif {[catch { set dv(day) }]} {
     5514        if {(![string compare $dv(month) [lindex $three 0]]) \
     5515                && (![string compare $dv(year) [lindex $three 1]])} {
     5516            set dv(day) [string trimleft [lindex $three 2] 0]
     5517        }
     5518    }
     5519    set elem($date) [array get dv]
     5520   
     5521    if {[catch { set day $dv(day) }]} {
     5522        set day 1
     5523    }
     5524    if {[catch {set secs [clock scan "$dv(month) $day, $dv(year)" -gmt true]}]} {
     5525        set secs 0
     5526    }
     5527   
     5528    return $secs
     5529}
     5530
     5531
    54935532#       }}}2 Other IPR texts
    54945533#       {{{2 Pass 2 (and subsequent) stuff for the whole document
     
    54995538    global copyshort copyshort1 copyshort2 copyshort3 copyshortTrust200811 \
    55005539           copyshortTrust200909 copyshortTrust200902 \
    5501            copyshortTrust200902esc copyshortTrust200909esc
     5540           codeComponents200909 pre5378escapeClause
    55025541    global funding funding1 funding2
    55035542    global backP
     
    55275566    }
    55285567
    5529     set newP 8
     5568    set newP 9
     5569    if {![info exists fv(.PARSEDDATE)]} {
     5570        set date [find_element date $fv(.CHILDREN)]
     5571        set secs [get_publication_date_seconds $date]
     5572        set fv(.PARSEDDATE) $secs
     5573        set elem($front) [array get fv]
     5574    }
    55305575    if {[catch { clock format $fv(.PARSEDDATE) -format "%Y%m%d" -gmt true } \
    55315576               ymd]} {
     
    55345579        set ymd ""
    55355580    }
    5536 
     5581   
    55375582    if {[string compare $attrs(number) ""]} {
    55385583        if {$attrs(number) <= 2499} {
     
    55575602            # for the RFCs listed above
    55585603            set newP 7
     5604        } elseif {$ymd < "20100101"} {
     5605            set newP 8
    55595606        }
    55605607    } elseif {[string compare $attrs(ipr) ""]} {
     
    55675614            # TLP 2009 09 copyright notice beginning with Nov 2009
    55685615            set newP 7
     5616        } elseif {$ymd < "20100401"} {
     5617            # TLP 2010 01 copyright notice beginning with Apr 2010
     5618            set newP 8
    55695619        }
    55705620        # note: no support for 2008 11 TLP text in IDs
    55715621    }
    55725622
    5573     if {$newP == 8} {
     5623    if {$newP == 9} {
     5624        set copyshort $copyshortTrust200909
     5625
     5626        if {![catch { set attrs(submissionType) }]} {
     5627          switch -- $attrs(submissionType) {
     5628            IETF {
     5629              regsub -all -- %CODECOMPONENTS% $copyshort $codeComponents200909 copyshort
     5630              # in the code components statement, say "Simplied BSD License"
     5631              regsub -all -- %SIMPLIFIED% $copyshort "Simplified " copyshort
     5632            }
     5633            default {
     5634              regsub -all -- %CODECOMPONENTS% $copyshort "" copyshort
     5635            }
     5636          }
     5637        }
     5638         
    55745639        # RFCs: include escape clause in Copyright Notice
    55755640        # IDs: include in Status Of This Memo (produced elsewhere), for date before Nov 2009
    55765641        if {![string compare $attrs(ipr) "pre5378Trust200902"] && \
    55775642            ([string compare $attrs(number) ""] || $ymd >= "20091101")} {
    5578             set copyshort $copyshortTrust200909esc
    5579         } else {
    5580             set copyshort $copyshortTrust200909
     5643            lappend copyshort $pre5378escapeClause
     5644        }
     5645        set funding ""
     5646        set copyrightP -1
     5647        set iprP 0
     5648    } elseif {$newP == 8} {
     5649        set copyshort $copyshortTrust200909
     5650        # pre-201004: append code component clause unconditionally
     5651        regsub -all -- %CODECOMPONENTS% $copyshort $codeComponents200909 copyshort
     5652        # in the code components statement, say "BSD License"
     5653        regsub -all -- %SIMPLIFIED% $copyshort "" copyshort
     5654         
     5655        # RFCs: include escape clause in Copyright Notice
     5656        # IDs: include in Status Of This Memo (produced elsewhere), for date before Nov 2009
     5657        if {![string compare $attrs(ipr) "pre5378Trust200902"] && \
     5658            ([string compare $attrs(number) ""] || $ymd >= "20091101")} {
     5659            lappend copyshort $pre5378escapeClause
    55815660        }
    55825661        set funding ""
     
    55845663        set iprP 0
    55855664    } elseif {$newP == 7} {
     5665        set copyshort $copyshortTrust200902
    55865666        # RFCs: include escape clause in Copyright Notice
    55875667        # IDs: include in Status Of This Memo (produced elsewhere)
    55885668        if {![string compare $attrs(ipr) "pre5378Trust200902"] && \
    55895669            [string compare $attrs(number) ""]} {
    5590             set copyshort $copyshortTrust200902esc
    5591         } else {
    5592             set copyshort $copyshortTrust200902
     5670            lappend copyshort $pre5378escapeClause
    55935671        }
    55945672        set funding ""
     
    58605938                        set copylong $copylong3
    58615939                    }
     5940                    default {
     5941                        unexpected error \
     5942                            "submissionType=\"$attrs(submissionType)\" unexpected for this boilerplate"
     5943                    }
    58625944                }
    58635945                set validity $validity1
     
    58695951                    independent {
    58705952                        set copylong $copylong5
     5953                    }
     5954                    default {
     5955                        unexpected error \
     5956                            "submissionType=\"$attrs(submissionType)\" unexpected for this boilerplate"
    58715957                    }
    58725958                }
     
    60026088#       {{{2 Front texts (either for the rfc or a reference)
    60036089
    6004 global copyshort copyshort1 copyshort2 idinfo idaburl idshurl
     6090global copyshort copyshort1 copyshort2 idinfo idinfo2 idaburl idshurl
    60056091
    60066092set idaburl "http://www.ietf.org/ietf/1id-abstracts.txt"
     
    60446130rights and restrictions with respect to this document."}
    60456131
    6046 set copyshortTrust200902esc \
    6047 {"Copyright (c) %YEAR% IETF Trust and the persons identified as the
    6048 document authors.  All rights reserved."
    6049 
    6050 "This document is subject to BCP 78 and the IETF Trust's Legal
    6051 Provisions Relating to IETF Documents in effect on the date of
    6052 publication of this document (http://trustee.ietf.org/license-info).
    6053 Please review these documents carefully, as they describe your
    6054 rights and restrictions with respect to this document."
    6055 
     6132set pre5378escapeClause \
    60566133"This document may contain material from IETF Documents or IETF
    60576134Contributions published or made publicly available before November
     
    60646141not be created outside the IETF Standards Process, except to format
    60656142it for publication as an RFC or to translate it into languages other
    6066 than English."}
     6143than English."
    60676144
    60686145set copyshortTrust200909 \
     
    60756152publication of this document.  Please review these documents
    60766153carefully, as they describe your rights and restrictions with respect
    6077 to this document. Code Components extracted from this document must
     6154to this document.%CODECOMPONENTS%"}
     6155
     6156set codeComponents200909 \
     6157" Code Components extracted from this document must
    60786158include Simplified BSD License text as described in Section 4.e of
    60796159the Trust Legal Provisions and are provided without warranty as
    6080 described in the BSD License."}
    6081 
    6082 set copyshortTrust200909esc \
    6083 {"Copyright (c) %YEAR% IETF Trust and the persons identified as the
    6084 document authors.  All rights reserved."
    6085 
    6086 "This document is subject to BCP 78 and the IETF Trust's Legal
    6087 Provisions Relating to IETF Documents
    6088 (http://trustee.ietf.org/license-info) in effect on the date of
    6089 publication of this document.  Please review these documents
    6090 carefully, as they describe your rights and restrictions with respect
    6091 to this document. Code Components extracted from this document must
    6092 include Simplified BSD License text as described in Section 4.e of
    6093 the Trust Legal Provisions and are provided without warranty as
    6094 described in the BSD License."
    6095 
    6096 "This document may contain material from IETF Documents or IETF
    6097 Contributions published or made publicly available before November
    6098 10, 2008.  The person(s) controlling the copyright in some of this
    6099 material may not have granted the IETF Trust the right to allow
    6100 modifications of such material outside the IETF Standards Process.
    6101 Without obtaining an adequate license from the person(s) controlling
    6102 the copyright in such materials, this document may not be modified
    6103 outside the IETF Standards Process, and derivative works of it may
    6104 not be created outside the IETF Standards Process, except to format
    6105 it for publication as an RFC or to translate it into languages other
    6106 than English."}
     6160described in the %SIMPLIFIED%BSD License."
    61076161
    61086162# From the ietf/1id-guidelines.txt file, Section 5.
     
    61296183}
    61306184
     6185# Shorter idinfo approved as an alternative by the IESG on 2010-1-5 and
     6186# announced on 2010-2-8:
     6187# http://www.ietf.org/mail-archive/web/ietf-announce/current/msg07008.html
     6188set idinfo2 {
     6189"%IPR%"
     6190
     6191"Internet-Drafts are working documents of the Internet Engineering
     6192Task Force (IETF).  Note that other groups may also distribute
     6193working documents as Internet-Drafts.  The list of current
     6194Internet-Drafts is at http://datatracker.ietf.org/drafts/current/."
     6195
     6196"Internet-Drafts are draft documents valid for a maximum of six months
     6197and may be updated, replaced, or obsoleted by other documents at any time.
     6198It is inappropriate to use Internet-Drafts as reference material or to cite
     6199them other than as &ldquo;work in progress.&rdquo;"
     6200
     6201"This Internet-Draft will expire on %EXPIRES%."
     6202}
     6203
    61316204#       }}}2 Front texts (either for the rfc or a reference)
    61326205#       {{{2 Remaining pass 2 (and subsequent) stuff
     
    61376210    global options
    61386211    global mode ofile
    6139     global categories copyshort idinfo idaburl idshurl iprstatus
     6212    global categories copyshort idinfo idinfo2 idaburl idshurl iprstatus
    61406213    global page_width center_fill_width
    61416214    global depth
     
    61566229    set date [find_element date $attrs(.CHILDREN)]
    61576230    array set dv $elem($date)
    6158     set three [clock format [clock seconds] -format "%B %Y %d"]
    6159     if {[catch { set dv(year) }]} {
    6160         set dv(year) [lindex $three 1]
    6161     }
    6162     if {[catch { set dv(month) }]} {
    6163         if {(![string compare $dv(year) [lindex $three 1]])} {
    6164             set dv(month) [lindex $three 0]
    6165             set dv(day) [string trimleft [lindex $three 2] 0]
    6166         } else {
    6167             unexpected error "I can't synthesize a date in $dv(year)"
    6168         }
    6169     } elseif {[catch { set dv(day) }]} {
    6170         if {(![string compare $dv(month) [lindex $three 0]]) \
    6171                 && (![string compare $dv(year) [lindex $three 1]])} {
    6172             set dv(day) [string trimleft [lindex $three 2] 0]
    6173         }
    6174     }
    6175     set elem($date) [array get dv]
    61766231
    61776232    array set rv $elem(1)
     
    61996254            set day 1
    62006255        }
    6201         if {[catch {set secs [clock scan "$dv(month) $day, $dv(year)" -gmt true]}]} {
    6202             set secs 0
    6203         }
    6204         set attrs(.PARSEDDATE) $secs
    6205         set elem($elemX) [array get attrs]
     6256        set secs $attrs(.PARSEDDATE)
    62066257
    62076258        if {[info exists rv(category)]} {
     
    62876338            lappend left "Expires:$colonspace $expires"
    62886339            set category "Expires $expires"
    6289             set status $idinfo
    62906340            set ipreal $rv(ipr)
    62916341            set ymd [clock format $attrs(.PARSEDDATE) -format "%Y%m%d" \
     
    62956345                set ipreal trust200902
    62966346            }
     6347            # Use the shorter alternative for the ID info for new IDs
     6348            # starting April 1, 2010.
     6349            if {$ymd >= 20100401} {
     6350                    set status $idinfo2
     6351            } else {
     6352                    set status $idinfo
     6353            }
    62976354            regsub -all -- "&" [lindex [lindex $iprstatus \
    62986355                                              [lsearch0 $iprstatus \
    62996356                                                        $ipreal]] 1] \
    63006357                        "\\\\\\&" ipr
     6358           
     6359            if {($ymd < "20100401")} {
     6360              # insert "to IETF" for documents before Feb 01 2010
     6361              regsub -all -- %TOIETF% $ipr "to IETF" ipr
     6362            } else {
     6363              regsub -all -- %TOIETF% $ipr "" ipr
     6364            }
     6365
    63016366            regsub -all -- %IPR% $status $ipr status
    63026367            if {![string compare $mode html]} {
     
    1014610211    global eatP
    1014710212
    10148     if {$eatP < 0} {
     10213    if {($eatP < 0) && ![regexp -- {^[.,?!]} $text]} {
    1014910214        set text " $text"
    1015010215    }
     10216
    1015110217    if {![string compare $buffer ""]} {
    1015210218        set buffer [format %*s $indent ""]
    1015310219        set buffer_align [current_align]
    1015410220    }
     10221# print_stack_trace
    1015510222    append buffer $text
    1015610223
     
    1017010237        }
    1017110238    }
     10239}
     10240
     10241# grab the current function name. Useful in debugging like this:
     10242# puts stderr "[get_current_function_name] your message goes here"
     10243proc get_current_function_name {} {
     10244    return [info level -1];
     10245}
     10246
     10247# print the current stack trace
     10248proc print_stack_trace {} {
     10249    set stack ""
     10250    set level -1
     10251    for { set x [expr {[info level] + $level}] } { $x > 0 } { incr x -1 } {
     10252        append stack "    called from [info level $x]\n"
     10253    }
     10254    puts stderr $stack
    1017210255}
    1017310256
     
    1064810731    pcdata_html [lindex $title 0]
    1064910732    write_html "</title>"
    10650     if {$options(.PRIVATE)} {
    10651         write_html -nonewline "<meta http-equiv=\"Expires\" content=\""
    10652         write_html -nonewline [clock format [clock seconds] \
    10653                                      -format "%a, %d %b %Y %T +0000" \
    10654                                      -gmt true]
    10655         write_html "\">"
    10656     }
    1065710733
    1065810734    # Begin new meta tags.
     
    1298813064    global eatP
    1298913065
    12990     if {$eatP < 0} {
     13066    if {($eatP < 0) && ![regexp -- {^[.,?!]} $text]} {
    1299113067        set text " $text"
    1299213068    }
     
    1767917755        check_vrsn_idle
    1768017756    } result]} {
    17681         if {[catch {package require Tk}]} {
     17757        if {![catch {package require Tk}]} {
    1768217758            catch { wm geometry . 10x10+-100+-100 }
    1768317759            catch { wm withdraw . }
Note: See TracChangeset for help on using the changeset viewer.