Changeset 11787


Ignore:
Timestamp:
2006-05-09T15:00:26+12:00 (18 years ago)
Author:
kjdon
Message:

added code to print the DownloadInfo header

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/perllib/printusage.pm

    r11686 r11787  
    6565    my $all = shift(@_);
    6666#    $all = 0 unless defined $all;
    67     if ($type ne "classify" && $type ne "plugin" && $type ne "script") {
     67    if ($type ne "classify" && $type ne "plugin" && $type ne "script" && $type ne "download") {
    6868    return;
    6969    }
     
    9696    &gsprintf(STDERR, "  <!ELEMENT Abstract      (#PCDATA)>\n");
    9797    &gsprintf(STDERR, "  <!ELEMENT Inherits      (#PCDATA)>\n");
     98    } elsif ($type eq "download") {
     99    if ($all) {
     100        &gsprintf(STDERR, "<!DOCTYPE DownloadInfoList [\n");
     101        &gsprintf(STDERR, "  <!ELEMENT DownloadInfoList  (DownloadInfo*)>\n");     
     102        &gsprintf(STDERR, "  <!ATTLIST DownloadInfoList\n");
     103        &gsprintf(STDERR, "            length CDATA #REQUIRED>\n");
     104    } else {
     105        &gsprintf(STDERR, "<!DOCTYPE DownloadInfo [\n");
     106    }   
     107    &gsprintf(STDERR, "  <!ELEMENT DownloadInfo      (Name, Desc, Abstract, Inherits, Arguments, DownloadInfo?)>\n");
     108    &gsprintf(STDERR, "  <!ELEMENT Abstract      (#PCDATA)>\n");
     109    &gsprintf(STDERR, "  <!ELEMENT Inherits      (#PCDATA)>\n");
     110   
    98111    } else {
    99112    &gsprintf(STDERR, "<!DOCTYPE Info [\n");
     
    140153        $displayname =~ s/</&amp;lt;/g; # doubly escaped
    141154        $displayname =~ s/>/&amp;gt;/g;
    142         &gsprintf(STDERR, "      <DisplayName>$displayname</Name>\n");
     155        &gsprintf(STDERR, "      <DisplayName>$displayname</DisplayName>\n");
    143156    }
    144157    &gsprintf(STDERR, "      <Desc>$optiondesc</Desc>\n");
Note: See TracChangeset for help on using the changeset viewer.