Changeset 2491 in project


Ignore:
Timestamp:
11/22/06 18:00:55 (15 years ago)
Author:
Mario Domenech Goulart
Message:
  • added support for HTML attributes without value (e.g., disabled for the input tag).
File:
1 edited

Legend:

Unmodified
Added
Removed
  • web-scheme/web-scheme-base.scm

    r1161 r2491  
    2323
    2424(define (ws:html-parse-attribs tag attribs)
    25   "Return a string ready to use in HTML code.  Raise an error is
    26 one of the symbols from ATTRIBS is not a TAG tag attribute."
     25  "Return a string ready to use in HTML code and a string of
     26warnings."
    2727  (ws:debug (conc tag " ### "))
    2828  (ws:debug attribs)
     
    3636             (lambda (item)
    3737               (cond ((symbol? item)
    38                       (begin
    39                         (when (not (ws:valid-attrib? tag item))
    40                           (set! warnings (string-append warnings (ws:warn "invalid attribute (" item ") for tag " tag "."))))
    41                        (string-append " " (symbol->string item) "=")))
    42                      (else (ws:quote-value (->string item)))))
     38                      (when (not (ws:valid-attrib? tag item))
     39                        (set! warnings (string-append warnings (ws:warn "invalid attribute (" item ") for tag " tag "."))))
     40                      (string-append " " (symbol->string item)))
     41                     (else
     42                      (string-append "=" (ws:quote-value (->string item))))))
    4343             attribs)))
    44       (values (string-concatenate str-attribs) warnings)
    45       ))))
     44      (values (string-concatenate str-attribs) warnings)))))
    4645
    4746(define (ws:tag-attribs args)
Note: See TracChangeset for help on using the changeset viewer.