[LON-CAPA-cvs] cvs: loncom /xml londefdef.pm

sakharuk lon-capa-cvs@mail.lon-capa.org
Tue, 14 Oct 2003 14:40:33 -0000


This is a MIME encoded message

--sakharuk1066142433
Content-Type: text/plain

sakharuk		Tue Oct 14 10:40:33 2003 EDT

  Modified files:              
    /loncom/xml	londefdef.pm 
  Log:
  Implemented <secect> and <option> tags.
  
  
--sakharuk1066142433
Content-Type: text/plain
Content-Disposition: attachment; filename="sakharuk-20031014104033.txt"

Index: loncom/xml/londefdef.pm
diff -u loncom/xml/londefdef.pm:1.180 loncom/xml/londefdef.pm:1.181
--- loncom/xml/londefdef.pm:1.180	Mon Oct 13 20:21:12 2003
+++ loncom/xml/londefdef.pm	Tue Oct 14 10:40:33 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Tags Default Definition Module 
 #
-# $Id: londefdef.pm,v 1.180 2003/10/14 00:21:12 albertel Exp $
+# $Id: londefdef.pm,v 1.181 2003/10/14 14:40:33 sakharuk Exp $
 # 
 #
 # Copyright Michigan State University Board of Trustees
@@ -140,7 +140,7 @@
     return $result;
 }
 
-#-- <html> tag    
+#-- <html> tag (end tag optional)
 sub start_html {
     my ($target,$token) = @_;
     my $currentstring = '';
@@ -188,7 +188,7 @@
     return $currentstring;
 }
 
-#-- <head> tag
+#-- <head> tag (end tag optional)
 sub start_head {
     my ($target,$token) = @_;
     my $currentstring = '';
@@ -208,7 +208,7 @@
     return $currentstring;
 }
 
-#-- <map> tag
+#-- <map> tag (end tag required)
 sub start_map {
     my ($target,$token) = @_;
     my $currentstring = '';
@@ -227,13 +227,15 @@
     return $currentstring;
 }
 
-#-- <select> tag
+#-- <select> tag (end tag required)
 sub start_select {
     my ($target,$token) = @_;
     my $currentstring = '';
     if ($target eq 'web') {
 	$currentstring = $token->[4];     
-    } 
+    }  elsif ($target eq 'tex') {
+	$Apache::londefdef::select=0;
+    }
     return $currentstring;
 }
 
@@ -246,13 +248,20 @@
     return $currentstring;
 }
 
-#-- <option> tag
+#-- <option> tag (end tag optional)
 sub start_option {
-    my ($target,$token) = @_;
+    my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_;
     my $currentstring = '';
     if ($target eq 'web') {
 	$currentstring = $token->[4];     
-    } 
+    } elsif ($target eq 'tex') {
+	$Apache::londefdef::select++;
+	if ($Apache::londefdef::select == 1) {
+	    $currentstring='\noindent\fbox{'.&Apache::lonxml::get_param('value',$parstack,$safeeval).'}\keephidden{';
+	} else {
+	    $currentstring='\keephidden{';
+	}
+    }
     return $currentstring;
 }
 
@@ -261,11 +270,13 @@
     my $currentstring = '';
     if ($target eq 'web') {
 	$currentstring = $token->[2];    
-    } 
+    }  elsif ($target eq 'tex') {
+	$currentstring='}';
+    }
     return $currentstring;
 }
 
-#-- <input> tag
+#-- <input> tag (end tag forbidden)
 sub start_input {
     my ($target,$token) = @_;
     my $currentstring = '';
@@ -284,7 +295,7 @@
     return $currentstring;
 }
 
-#-- <textarea> tag
+#-- <textarea> tag (end tag required)
 sub start_textarea {
     my ($target,$token) = @_;
     my $currentstring = '';
@@ -303,7 +314,7 @@
     return $currentstring;
 }
 
-#-- <form> tag
+#-- <form> tag (end tag required)
 sub start_form {
     my ($target,$token) = @_;
     my $currentstring = '';
@@ -322,7 +333,7 @@
     return $currentstring;
 }
 
-#-- <title> tag
+#-- <title> tag (end tag required)
 sub start_title {
     my ($target,$token) = @_;
     my $currentstring = '';
@@ -353,7 +364,7 @@
     return $currentstring;
 }
 
-#-- <meta> tag
+#-- <meta> tag (end tag forbidden)
 sub start_meta {
     my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_;
     my $currentstring = '';
@@ -467,7 +478,7 @@
     return $currentstring;
 }
 
-#-- <body> tag
+#-- <body> tag (end tag required)
 sub start_body {
     my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_;
     my $currentstring = '';
@@ -553,7 +564,7 @@
     return $currentstring;
 }
 
-#-- <center> tag
+#-- <center> tag (end tag required)
 sub start_center {
     my ($target,$token) = @_;
     my $currentstring = '';
@@ -576,7 +587,7 @@
     return $currentstring;
 }
 
-#-- <b> tag
+#-- <b> tag (end tag required)
 sub start_b {
     my ($target,$token) = @_;
     my $currentstring = '';
@@ -599,7 +610,7 @@
     return $currentstring;
 }
 
-#-- <strong> tag
+#-- <strong> tag (end tag required)
 sub start_strong {
     my ($target,$token) = @_;
     my $currentstring = '';
@@ -623,7 +634,7 @@
     return $currentstring;
 }
 
-#-- <h1> tag
+#-- <h1> tag (end tag required)
 sub start_h1 {
     my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_;
     my $currentstring = '';
@@ -887,7 +898,7 @@
     return $currentstring;
 }
 
-#--- <cite> tag
+#--- <cite> tag (end tag required)
 sub start_cite {
     my ($target,$token) = @_;
     my $currentstring = '';
@@ -910,7 +921,7 @@
     return $currentstring;
 }
 
-#-- <i> tag
+#-- <i> tag (end tag required)
 sub start_i {
     my ($target,$token) = @_;
     my $currentstring = '';
@@ -933,7 +944,7 @@
     return $currentstring;
 }
 
-#-- <address> tag
+#-- <address> tag (end tag required)
 sub start_address {
     my ($target,$token) = @_;
     my $currentstring = '';
@@ -956,7 +967,7 @@
     return $currentstring;
 }
 
-#-- <dfn> tag
+#-- <dfn> tag (end tag required)
 sub start_dfn {
     my ($target,$token) = @_;
     my $currentstring = '';
@@ -979,7 +990,7 @@
     return $currentstring;
 }
 
-#-- <tt> tag
+#-- <tt> tag (end tag required)
 sub start_tt {
     my ($target,$token) = @_;
     my $currentstring = '';
@@ -1002,7 +1013,7 @@
     return $currentstring;
 }
 
-#-- <kbd> tag
+#-- <kbd> tag (end tag required)
 sub start_kbd {
     my ($target,$token) = @_;
     my $currentstring = '';
@@ -1025,7 +1036,7 @@
     return $currentstring;
 }
 
-#-- <code> tag
+#-- <code> tag (end tag required)
 sub start_code {
     my ($target,$token) = @_;
     my $currentstring = '';
@@ -1048,7 +1059,7 @@
     return $currentstring;
 }
 
-#-- <em> tag
+#-- <em> tag (end tag required)
 sub start_em {
     my ($target,$token) = @_;
     my $currentstring = '';
@@ -1071,7 +1082,7 @@
     return $currentstring;
 }
 
-#-- <q> tag
+#-- <q> tag (end tag required)
 sub start_q {
     my ($target,$token) = @_;
     my $currentstring = '';
@@ -1094,7 +1105,7 @@
     return $currentstring;
 }
 
-#-- <p> tag
+#-- <p> tag (end tag optional)
 sub start_p {
     my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_;
     my $currentstring = '';
@@ -1117,7 +1128,7 @@
     return $currentstring;
 }
 
-#-- <br> tag
+#-- <br> tag (end tag forbidden)
 sub start_br {
     my ($target,$token,$tagstack,$parstack,$parser,$safeeval)=@_;
     my $currentstring = '';
@@ -1140,7 +1151,7 @@
     return $currentstring;
 }
 
-#-- <big> tag
+#-- <big> tag (end tag required)
 sub start_big {
     my ($target,$token) = @_;
     my $currentstring = '';
@@ -1163,7 +1174,7 @@
     return $currentstring;
 }
 
-#-- <small> tag
+#-- <small> tag (end tag required)
 sub start_small {
     my ($target,$token) = @_;
     my $currentstring = '';
@@ -1186,7 +1197,7 @@
     return $currentstring;
 }
 
-#-- <basefont> tag
+#-- <basefont> tag (end tag forbidden)
 sub start_basefont {
     my ($target,$token,$tagstack,$parstack,$parser,$safeeval)=@_;
     my $currentstring = '';
@@ -1215,7 +1226,7 @@
     return $currentstring;
 }
 
-#-- <font> tag
+#-- <font> tag (end tag required)
 sub start_font {
     my ($target,$token,$tagstack,$parstack,$parser,$safeeval)=@_;
     my $currentstring = '';
@@ -1253,7 +1264,7 @@
     return $currentstring;
 }
  
-#-- <strike> tag
+#-- <strike> tag (end tag required)
 sub start_strike {
     my ($target,$token) = @_;
     my $currentstring = '';
@@ -1279,7 +1290,7 @@
     return $currentstring;
 }
 
-#-- <s> tag
+#-- <s> tag (end tag required)
 sub start_s {
     my ($target,$token) = @_;
     my $currentstring = '';
@@ -1305,7 +1316,7 @@
     return $currentstring;
 }
 
-#-- <sub> tag
+#-- <sub> tag (end tag required)
 sub start_sub {
     my ($target,$token) = @_;
     my $currentstring = '';
@@ -1328,7 +1339,7 @@
     return $currentstring;
 }
 
-#-- <sup> tag
+#-- <sup> tag (end tag required)
 sub start_sup {
     my ($target,$token) = @_;
     my $currentstring = '';
@@ -1351,7 +1362,7 @@
     return $currentstring;
 }
 
-#-- <hr> tag
+#-- <hr> tag (end tag forbidden)
 sub start_hr {
     my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_;
     my $currentstring = '';
@@ -1391,7 +1402,7 @@
     return $currentstring;
 }
 
-#-- <div> tag
+#-- <div> tag (end tag required)
 sub start_div {
     my ($target,$token) = @_;
     my $currentstring = '';
@@ -1410,7 +1421,7 @@
     return $currentstring;
 }
 
-#-- <a> tag
+#-- <a> tag (end tag required)
 sub start_a {
     my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_;
     my $currentstring = '';
@@ -1440,7 +1451,7 @@
     return $currentstring;
 }
 
-#-- <li> tag
+#-- <li> tag (end tag optional)
 sub start_li {
     my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_;
     my $currentstring = '';
@@ -1470,7 +1481,7 @@
     return $currentstring;
 }
 
-#-- <u> tag
+#-- <u> tag (end tag required)
 sub start_u {
     my ($target,$token) = @_;
     my $currentstring = '';
@@ -1496,7 +1507,7 @@
     return $currentstring;
 }
 
-#-- <ul> tag
+#-- <ul> tag (end tag required)
 sub start_ul {
     my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_;
     my $currentstring = '';
@@ -1539,7 +1550,7 @@
     return $currentstring;
 }
 
-#-- <menu> tag
+#-- <menu> tag (end tag required)
 sub start_menu {
     my ($target,$token) = @_;
     my $currentstring = '';
@@ -1562,7 +1573,7 @@
     return $currentstring;
 }
 
-#-- <dir> tag
+#-- <dir> tag (end tag required)
 sub start_dir {
     my ($target,$token) = @_;
     my $currentstring = '';
@@ -1585,7 +1596,7 @@
     return $currentstring;
 }
 
-#-- <ol> tag
+#-- <ol> tag (end tag required)
 sub start_ol {
     my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_;
     my $currentstring = '';
@@ -1638,7 +1649,7 @@
     return $currentstring;
 }
 
-#-- <dl> tag
+#-- <dl> tag (end tag required)
 sub start_dl {
     my ($target,$token) = @_;
     my $currentstring = '';
@@ -1716,7 +1727,7 @@
     return $item;
 }
 
-#-- <dd> tag
+#-- <dd> tag (end tag optional)
 sub start_dd {
     my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_;
     my $currentstring = '';
@@ -1746,7 +1757,7 @@
     return $currentstring;
 }
 
-#-- <table> tag
+#-- <table> tag (end tag required)
 sub start_table {
     my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_;
     my $textwidth='';
@@ -2072,7 +2083,7 @@
     }
     return $currentstring;
 }
-#-- <img> tag
+#-- <img> tag (end tag forbidden)
 sub start_img {
     my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_;
     my $src = &Apache::lonxml::get_param('src',$parstack,$safeeval,
@@ -2184,7 +2195,7 @@
     return $currentstring;
 }
 
-#-- <applet> tag
+#-- <applet> tag (end tag required)
 sub start_applet {
     my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_;
     
@@ -2233,7 +2244,7 @@
     return $currentstring;
 }
 
-#-- <embed> tag
+#-- <embed> tag (end tag optional/required)
 sub start_embed {    
     my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_;
     my $src=&Apache::lonxml::get_param('src',$parstack,$safeeval,undef,1);
@@ -2265,7 +2276,7 @@
     return $currentstring;
 }
 
-#-- <param> tag
+#-- <param> tag (end tag forbidden)
 sub start_param {
     my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_;
     if (&Apache::lonxml::get_param
@@ -2320,7 +2331,8 @@
     return '';
 }
 
-#-- Frames
+#-- Frames (end tag required)
+#-- <frameset>
 sub start_frameset {
     my ($target,$token) = @_;
     my $currentstring = '';
@@ -2366,7 +2378,7 @@
     return $currentstring;
 }
 
-#-- <xmp>
+#-- <xmp> (end tag required)
 sub start_xmp {
     my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_;
     my $currentstring = '';
@@ -2389,7 +2401,7 @@
     return $currentstring;
 }
 
-#-- <pre>
+#-- <pre> (end tag required)
 sub start_pre {
     my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_;
     my $currentstring = '';
@@ -2472,7 +2484,7 @@
     return $currentstring;
 }
 
-#-- <abbr> tag
+#-- <abbr> tag (end tag required)
 sub start_abbr {
     my ($target,$token) = @_;
     my $currentstring = '';
@@ -2491,7 +2503,7 @@
     return $currentstring;
 }
 
-#-- <acronym> tag
+#-- <acronym> tag (end tag required)
 sub start_acronym {
     my ($target,$token) = @_;
     my $currentstring = '';
@@ -2510,7 +2522,7 @@
     return $currentstring;
 }
 
-#-- <area> tag
+#-- <area> tag (end tag forbidden)
 sub start_area {
     my ($target,$token) = @_;
     my $currentstring = '';
@@ -2529,7 +2541,7 @@
     return $currentstring;
 }
 
-#-- <base> tag
+#-- <base> tag (end tag forbidden)
 sub start_base {
     my ($target,$token) = @_;
     my $currentstring = '';
@@ -2548,7 +2560,7 @@
     return $currentstring;
 }
 
-#-- <bdo> tag
+#-- <bdo> tag (end tag required)
 sub start_bdo {
     my ($target,$token) = @_;
     my $currentstring = '';
@@ -2567,7 +2579,7 @@
     return $currentstring;
 }
 
-#-- <bgsound> tag
+#-- <bgsound> tag (end tag optional)
 sub start_bgsound {
     my ($target,$token) = @_;
     my $currentstring = '';
@@ -2586,7 +2598,7 @@
     return $currentstring;
 }
 
-#-- <blink> tag
+#-- <blink> tag (end tag required)
 sub start_blink {
     my ($target,$token) = @_;
     my $currentstring = '';
@@ -2605,7 +2617,7 @@
     return $currentstring;
 }
 
-#-- <blockquote> tag
+#-- <blockquote> tag (end tag required)
 sub start_blockquote {
     my ($target,$token) = @_;
     my $currentstring = '';
@@ -2624,7 +2636,7 @@
     return $currentstring;
 }
 
-#-- <button> tag
+#-- <button> tag (end tag required)
 sub start_button {
     my ($target,$token) = @_;
     my $currentstring = '';
@@ -2643,7 +2655,7 @@
     return $currentstring;
 }
 
-#-- <caption> tag
+#-- <caption> tag (end tag required)
 sub start_caption {
     my ($target,$token) = @_;
     my $currentstring = '';
@@ -2662,7 +2674,7 @@
     return $currentstring;
 }
 
-#-- <col> tag
+#-- <col> tag (end tag forbdden)
 sub start_col {
     my ($target,$token) = @_;
     my $currentstring = '';
@@ -2681,7 +2693,7 @@
     return $currentstring;
 }
 
-#-- <colgroup> tag
+#-- <colgroup> tag (end tag optional)
 sub start_colgroup {
     my ($target,$token) = @_;
     my $currentstring = '';
@@ -2700,7 +2712,7 @@
     return $currentstring;
 }
 
-#-- <del> tag
+#-- <del> tag (end tag required)
 sub start_del {
     my ($target,$token) = @_;
     my $currentstring = '';
@@ -2719,7 +2731,7 @@
     return $currentstring;
 }
 
-#-- <fieldset> tag
+#-- <fieldset> tag (end tag required)
 sub start_fieldset {
     my ($target,$token) = @_;
     my $currentstring = '';
@@ -2738,7 +2750,7 @@
     return $currentstring;
 }
 
-#-- <frame> tag
+#-- <frame> tag (end tag forbidden)
 sub start_frame {
     my ($target,$token) = @_;
     my $currentstring = '';
@@ -2757,7 +2769,7 @@
     return $currentstring;
 }
 
-#-- <iframe> tag
+#-- <iframe> tag (end tag required)
 sub start_iframe {
     my ($target,$token) = @_;
     my $currentstring = '';
@@ -2776,7 +2788,7 @@
     return $currentstring;
 }
 
-#-- <ins> tag
+#-- <ins> tag (end tag required)
 sub start_ins {
     my ($target,$token) = @_;
     my $currentstring = '';
@@ -2795,7 +2807,7 @@
     return $currentstring;
 }
 
-#-- <isindex> tag
+#-- <isindex> tag (end tag forbidden)
 sub start_isindex {
     my ($target,$token) = @_;
     my $currentstring = '';
@@ -2814,7 +2826,7 @@
     return $currentstring;
 }
 
-#-- <keygen> tag
+#-- <keygen> tag (end tag forbidden)
 sub start_keygen {
     my ($target,$token) = @_;
     my $currentstring = '';
@@ -2852,7 +2864,7 @@
     return $currentstring;
 }
 
-#-- <layer> tag
+#-- <layer> tag (end tag required)
 sub start_layer {
     my ($target,$token) = @_;
     my $currentstring = '';
@@ -2871,7 +2883,7 @@
     return $currentstring;
 }
 
-#-- <legend> tag
+#-- <legend> tag (end tag required)
 sub start_legend {
     my ($target,$token) = @_;
     my $currentstring = '';
@@ -2890,7 +2902,7 @@
     return $currentstring;
 }
 
-#-- <link> tag
+#-- <link> tag (end tag forbidden)
 sub start_link {
     my ($target,$token) = @_;
     my $currentstring = '';
@@ -2909,7 +2921,7 @@
     return $currentstring;
 }
 
-#-- <marquee> tag
+#-- <marquee> tag (end tag optional)
 sub start_marquee {
     my ($target,$token) = @_;
     my $currentstring = '';

--sakharuk1066142433--