(declare (block) (standard-bindings) (extended-bindings))
(begin
  (define std/xml/ssax#read-xml__%
    (lambda (_g16677_ _ns1283012833_ _source12835_)
      (let* ((_ns12837_
              (if (eq? _ns1283012833_ absent-value) '() _ns1283012833_))
             (_ns12839_
              (if (table? _ns12837_) (table->list _ns12837_) _ns12837_))
             (_ns12873_
              (map (lambda (_e1284012842_)
                     (let* ((_g1284412851_ _e1284012842_)
                            (_E1284612855_
                             (lambda ()
                               (error '"No clause matching" _g1284412851_)))
                            (_K1284712861_
                             (lambda (_id12858_ _uri12859_)
                               (cons (string->symbol _id12858_) _uri12859_))))
                       (if (let ()
                             (declare (not safe))
                             (##pair? _g1284412851_))
                           (let ((_hd1284812864_
                                  (let ()
                                    (declare (not safe))
                                    (##car _g1284412851_)))
                                 (_tl1284912866_
                                  (let ()
                                    (declare (not safe))
                                    (##cdr _g1284412851_))))
                             (let* ((_uri12869_ _hd1284812864_)
                                    (_id12871_ _tl1284912866_))
                               (_K1284712861_ _id12871_ _uri12869_)))
                           (_E1284612855_))))
                   _ns12839_)))
        (if (input-port? _source12835_)
            (std/xml/ssax#ssax:xml->sxml _source12835_ _ns12873_)
            (if (string? _source12835_)
                (call-with-input-string
                 _source12835_
                 (lambda (_g1287512877_)
                   (std/xml/ssax#ssax:xml->sxml _g1287512877_ _ns12873_)))
                (if (u8vector? _source12835_)
                    (call-with-input-u8vector
                     _source12835_
                     (lambda (_g1287912881_)
                       (std/xml/ssax#ssax:xml->sxml _g1287912881_ _ns12873_)))
                    (error '"Bad input source; expected port, string, or u8vector"
                           _source12835_)))))))
  (define std/xml/ssax#read-xml__@
    (lambda (_keys1282912887_ . _args12889_)
      (apply std/xml/ssax#read-xml__%
             _keys1282912887_
             (table-ref _keys1282912887_ 'namespaces: absent-value)
             _args12889_)))
  (define std/xml/ssax#read-xml
    (lambda _args1283112895_
      (apply keyword-dispatch
             '#(namespaces:)
             std/xml/ssax#read-xml__@
             _args1283112895_)))
  (define std/xml/ssax#ssax:warn void)
  (define std/xml/ssax#string-null? string-empty?)
  (define std/xml/ssax#nl (string '#\newline))
  (define std/xml/ssax#cout
    (lambda _args12824_
      (for-each
       (lambda (_x12826_)
         (if (procedure? _x12826_) (_x12826_) (display _x12826_)))
       _args12824_)))
  (define std/xml/ssax#cerr
    (lambda _args12820_
      (for-each
       (lambda (_x12822_)
         (if (procedure? _x12822_)
             (_x12822_ (current-error-port))
             (display _x12822_ (current-error-port))))
       _args12820_)))
  (define std/xml/ssax#ascii->char integer->char)
  (define std/xml/ssax#ucscode->char
    (lambda (_code12818_) (integer->char _code12818_)))
  (define std/xml/ssax#char-return (std/xml/ssax#ascii->char '13))
  (define std/xml/ssax#char-tab (std/xml/ssax#ascii->char '9))
  (define std/xml/ssax#char-newline (std/xml/ssax#ascii->char '10))
  (define std/xml/ssax#parser-error
    (lambda (_port12814_ _message12815_ . _rest12816_)
      (apply error _message12815_ _rest12816_)))
  (define std/xml/ssax#peek-next-char__%
    (lambda (_port12804_) (read-char _port12804_) (peek-char _port12804_)))
  (define std/xml/ssax#peek-next-char__0
    (lambda ()
      (let ((_port12810_ (current-input-port)))
        (std/xml/ssax#peek-next-char__% _port12810_))))
  (define std/xml/ssax#peek-next-char
    (lambda _g16679_
      (let ((_g16678_ (let () (declare (not safe)) (##length _g16679_))))
        (cond ((let () (declare (not safe)) (##fx= _g16678_ 0))
               (apply std/xml/ssax#peek-next-char__0 _g16679_))
              ((let () (declare (not safe)) (##fx= _g16678_ 1))
               (apply std/xml/ssax#peek-next-char__% _g16679_))
              (else
               (##raise-wrong-number-of-arguments-exception
                std/xml/ssax#peek-next-char
                _g16679_))))))
  (define std/xml/ssax#assert-curr-char__%
    (lambda (_expected-chars12785_ _comment12786_ _port12787_)
      (let ((_c12789_ (read-char _port12787_)))
        (if (memv _c12789_ _expected-chars12785_)
            _c12789_
            (std/xml/ssax#parser-error
             _port12787_
             '"Wrong character "
             _c12789_
             '" (0x"
             (if (eof-object? _c12789_)
                 '"*eof*"
                 (number->string (char->integer _c12789_) '16))
             '") "
             _comment12786_
             '". "
             _expected-chars12785_
             '" expected")))))
  (define std/xml/ssax#assert-curr-char__0
    (lambda (_expected-chars12794_ _comment12795_)
      (let ((_port12797_ (current-input-port)))
        (std/xml/ssax#assert-curr-char__%
         _expected-chars12794_
         _comment12795_
         _port12797_))))
  (define std/xml/ssax#assert-curr-char
    (lambda _g16681_
      (let ((_g16680_ (let () (declare (not safe)) (##length _g16681_))))
        (cond ((let () (declare (not safe)) (##fx= _g16680_ 2))
               (apply std/xml/ssax#assert-curr-char__0 _g16681_))
              ((let () (declare (not safe)) (##fx= _g16680_ 3))
               (apply std/xml/ssax#assert-curr-char__% _g16681_))
              (else
               (##raise-wrong-number-of-arguments-exception
                std/xml/ssax#assert-curr-char
                _g16681_))))))
  (define std/xml/ssax#skip-until__%
    (lambda (_arg12762_ _port12763_)
      (if (number? _arg12762_)
          (let _$loop12765_ ((_i12768_ _arg12762_))
            (if (not (positive? _i12768_))
                '#f
                (begin
                  (if (eof-object? (read-char _port12763_))
                      (std/xml/ssax#parser-error
                       _port12763_
                       '"Unexpected EOF while skipping "
                       _arg12762_
                       '" characters")
                      '#!void)
                  (_$loop12765_ (- _i12768_ '1)))))
          (let _loop12770_ ((_c12772_ (read-char _port12763_)))
            (if (memv _c12772_ _arg12762_)
                _c12772_
                (if (eof-object? _c12772_)
                    (if (memq '*eof* _arg12762_)
                        _c12772_
                        (std/xml/ssax#parser-error
                         _port12763_
                         '"Unexpected EOF while skipping until "
                         _arg12762_))
                    (_loop12770_ (read-char _port12763_))))))))
  (define std/xml/ssax#skip-until__0
    (lambda (_arg12777_)
      (let ((_port12779_ (current-input-port)))
        (std/xml/ssax#skip-until__% _arg12777_ _port12779_))))
  (define std/xml/ssax#skip-until
    (lambda _g16683_
      (let ((_g16682_ (let () (declare (not safe)) (##length _g16683_))))
        (cond ((let () (declare (not safe)) (##fx= _g16682_ 1))
               (apply std/xml/ssax#skip-until__0 _g16683_))
              ((let () (declare (not safe)) (##fx= _g16682_ 2))
               (apply std/xml/ssax#skip-until__% _g16683_))
              (else
               (##raise-wrong-number-of-arguments-exception
                std/xml/ssax#skip-until
                _g16683_))))))
  (define std/xml/ssax#skip-while__%
    (lambda (_skip-chars12743_ _port12744_)
      (let _$loop12746_ ((_c12749_ (peek-char _port12744_)))
        (if (not (memv _c12749_ _skip-chars12743_))
            _c12749_
            (begin
              (read-char _port12744_)
              (_$loop12746_ (peek-char _port12744_)))))))
  (define std/xml/ssax#skip-while__0
    (lambda (_skip-chars12754_)
      (let ((_port12756_ (current-input-port)))
        (std/xml/ssax#skip-while__% _skip-chars12754_ _port12756_))))
  (define std/xml/ssax#skip-while
    (lambda _g16685_
      (let ((_g16684_ (let () (declare (not safe)) (##length _g16685_))))
        (cond ((let () (declare (not safe)) (##fx= _g16684_ 1))
               (apply std/xml/ssax#skip-while__0 _g16685_))
              ((let () (declare (not safe)) (##fx= _g16684_ 2))
               (apply std/xml/ssax#skip-while__% _g16685_))
              (else
               (##raise-wrong-number-of-arguments-exception
                std/xml/ssax#skip-while
                _g16685_))))))
  (define std/xml/ssax#input-parse:init-buffer
    (let ((_buffer12739_ (make-string '512))) (lambda () _buffer12739_)))
  (define std/xml/ssax#next-token-old__%
    (lambda (_prefix-skipped-chars12701_
             _break-chars12702_
             _comment12703_
             _port12704_)
      (let* ((_buffer12706_ (std/xml/ssax#input-parse:init-buffer))
             (_curr-buf-len12708_ (string-length _buffer12706_))
             (_quantum12710_ _curr-buf-len12708_))
        (let _loop12713_ ((_i12715_ '0)
                          (_c12716_
                           (std/xml/ssax#skip-while__%
                            _prefix-skipped-chars12701_
                            _port12704_)))
          (if (memv _c12716_ _break-chars12702_)
              (substring _buffer12706_ '0 _i12715_)
              (if (eof-object? _c12716_)
                  (if (memq '*eof* _break-chars12702_)
                      (substring _buffer12706_ '0 _i12715_)
                      (std/xml/ssax#parser-error
                       _port12704_
                       '"EOF while reading a token "
                       _comment12703_))
                  (begin
                    (if (>= _i12715_ _curr-buf-len12708_)
                        (begin
                          (set! _buffer12706_
                                (string-append
                                 _buffer12706_
                                 (make-string _quantum12710_)))
                          (set! _quantum12710_ _curr-buf-len12708_)
                          (set! _curr-buf-len12708_
                                (string-length _buffer12706_)))
                        '#!void)
                    (string-set! _buffer12706_ _i12715_ _c12716_)
                    (read-char _port12704_)
                    (_loop12713_
                     (+ '1 _i12715_)
                     (peek-char _port12704_)))))))))
  (define std/xml/ssax#next-token-old__0
    (lambda (_prefix-skipped-chars12721_ _break-chars12722_)
      (let* ((_comment12724_ '"") (_port12726_ (current-input-port)))
        (std/xml/ssax#next-token-old__%
         _prefix-skipped-chars12721_
         _break-chars12722_
         _comment12724_
         _port12726_))))
  (define std/xml/ssax#next-token-old__1
    (lambda (_prefix-skipped-chars12728_ _break-chars12729_ _comment12730_)
      (let ((_port12732_ (current-input-port)))
        (std/xml/ssax#next-token-old__%
         _prefix-skipped-chars12728_
         _break-chars12729_
         _comment12730_
         _port12732_))))
  (define std/xml/ssax#next-token-old
    (lambda _g16687_
      (let ((_g16686_ (let () (declare (not safe)) (##length _g16687_))))
        (cond ((let () (declare (not safe)) (##fx= _g16686_ 2))
               (apply std/xml/ssax#next-token-old__0 _g16687_))
              ((let () (declare (not safe)) (##fx= _g16686_ 3))
               (apply std/xml/ssax#next-token-old__1 _g16687_))
              ((let () (declare (not safe)) (##fx= _g16686_ 4))
               (apply std/xml/ssax#next-token-old__% _g16687_))
              (else
               (##raise-wrong-number-of-arguments-exception
                std/xml/ssax#next-token-old
                _g16687_))))))
  (define std/xml/ssax#next-token__%
    (lambda (_prefix-skipped-chars12661_
             _break-chars12662_
             _comment12663_
             _port12664_)
      (let _outer12666_ ((_buffer12668_ (std/xml/ssax#input-parse:init-buffer))
                         (_filled-buffer-l12669_ '())
                         (_c12670_
                          (std/xml/ssax#skip-while__%
                           _prefix-skipped-chars12661_
                           _port12664_)))
        (let ((_curr-buf-len12672_ (string-length _buffer12668_)))
          (let _loop12674_ ((_i12676_ '0) (_c12677_ _c12670_))
            (if (memv _c12677_ _break-chars12662_)
                (if (null? _filled-buffer-l12669_)
                    (substring _buffer12668_ '0 _i12676_)
                    (std/srfi/13#string-concatenate-reverse__%
                     _filled-buffer-l12669_
                     _buffer12668_
                     _i12676_))
                (if (eof-object? _c12677_)
                    (if (memq '*eof* _break-chars12662_)
                        (if (null? _filled-buffer-l12669_)
                            (substring _buffer12668_ '0 _i12676_)
                            (std/srfi/13#string-concatenate-reverse__%
                             _filled-buffer-l12669_
                             _buffer12668_
                             _i12676_))
                        (std/xml/ssax#parser-error
                         _port12664_
                         '"EOF while reading a token "
                         _comment12663_))
                    (if (>= _i12676_ _curr-buf-len12672_)
                        (_outer12666_
                         (make-string _curr-buf-len12672_)
                         (cons _buffer12668_ _filled-buffer-l12669_)
                         _c12677_)
                        (begin
                          (string-set! _buffer12668_ _i12676_ _c12677_)
                          (read-char _port12664_)
                          (_loop12674_
                           (+ '1 _i12676_)
                           (peek-char _port12664_)))))))))))
  (define std/xml/ssax#next-token__0
    (lambda (_prefix-skipped-chars12682_ _break-chars12683_)
      (let* ((_comment12685_ '"") (_port12687_ (current-input-port)))
        (std/xml/ssax#next-token__%
         _prefix-skipped-chars12682_
         _break-chars12683_
         _comment12685_
         _port12687_))))
  (define std/xml/ssax#next-token__1
    (lambda (_prefix-skipped-chars12689_ _break-chars12690_ _comment12691_)
      (let ((_port12693_ (current-input-port)))
        (std/xml/ssax#next-token__%
         _prefix-skipped-chars12689_
         _break-chars12690_
         _comment12691_
         _port12693_))))
  (define std/xml/ssax#next-token
    (lambda _g16689_
      (let ((_g16688_ (let () (declare (not safe)) (##length _g16689_))))
        (cond ((let () (declare (not safe)) (##fx= _g16688_ 2))
               (apply std/xml/ssax#next-token__0 _g16689_))
              ((let () (declare (not safe)) (##fx= _g16688_ 3))
               (apply std/xml/ssax#next-token__1 _g16689_))
              ((let () (declare (not safe)) (##fx= _g16688_ 4))
               (apply std/xml/ssax#next-token__% _g16689_))
              (else
               (##raise-wrong-number-of-arguments-exception
                std/xml/ssax#next-token
                _g16689_))))))
  (define std/xml/ssax#next-token-of__%
    (lambda (_incl-list/pred12620_ _port12621_)
      (let* ((_buffer12623_ (std/xml/ssax#input-parse:init-buffer))
             (_curr-buf-len12625_ (string-length _buffer12623_)))
        (if (procedure? _incl-list/pred12620_)
            (let _outer12628_ ((_buffer12630_ _buffer12623_)
                               (_filled-buffer-l12631_ '()))
              (let _loop12633_ ((_i12635_ '0))
                (if (>= _i12635_ _curr-buf-len12625_)
                    (_outer12628_
                     (make-string _curr-buf-len12625_)
                     (cons _buffer12630_ _filled-buffer-l12631_))
                    (let ((_c12637_
                           (_incl-list/pred12620_ (peek-char _port12621_))))
                      (if _c12637_
                          (begin
                            (string-set! _buffer12630_ _i12635_ _c12637_)
                            (read-char _port12621_)
                            (_loop12633_ (+ '1 _i12635_)))
                          (if (null? _filled-buffer-l12631_)
                              (substring _buffer12630_ '0 _i12635_)
                              (std/srfi/13#string-concatenate-reverse__%
                               _filled-buffer-l12631_
                               _buffer12630_
                               _i12635_)))))))
            (let _outer12639_ ((_buffer12641_ _buffer12623_)
                               (_filled-buffer-l12642_ '()))
              (let _loop12644_ ((_i12646_ '0))
                (if (>= _i12646_ _curr-buf-len12625_)
                    (_outer12639_
                     (make-string _curr-buf-len12625_)
                     (cons _buffer12641_ _filled-buffer-l12642_))
                    (let ((_c12648_ (peek-char _port12621_)))
                      (if (not (memv _c12648_ _incl-list/pred12620_))
                          (if (null? _filled-buffer-l12642_)
                              (substring _buffer12641_ '0 _i12646_)
                              (std/srfi/13#string-concatenate-reverse__%
                               _filled-buffer-l12642_
                               _buffer12641_
                               _i12646_))
                          (begin
                            (string-set! _buffer12641_ _i12646_ _c12648_)
                            (read-char _port12621_)
                            (_loop12644_ (+ '1 _i12646_))))))))))))
  (define std/xml/ssax#next-token-of__0
    (lambda (_incl-list/pred12653_)
      (let ((_port12655_ (current-input-port)))
        (std/xml/ssax#next-token-of__% _incl-list/pred12653_ _port12655_))))
  (define std/xml/ssax#next-token-of
    (lambda _g16691_
      (let ((_g16690_ (let () (declare (not safe)) (##length _g16691_))))
        (cond ((let () (declare (not safe)) (##fx= _g16690_ 1))
               (apply std/xml/ssax#next-token-of__0 _g16691_))
              ((let () (declare (not safe)) (##fx= _g16690_ 2))
               (apply std/xml/ssax#next-token-of__% _g16691_))
              (else
               (##raise-wrong-number-of-arguments-exception
                std/xml/ssax#next-token-of
                _g16691_))))))
  (define std/xml/ssax#*read-line-breaks*
    (list std/xml/ssax#char-newline std/xml/ssax#char-return '*eof*))
  (define std/xml/ssax#read-text-line__%
    (lambda (_port12604_)
      (if (eof-object? (peek-char _port12604_))
          (peek-char _port12604_)
          (let* ((_line12606_
                  (std/xml/ssax#next-token__%
                   '()
                   std/xml/ssax#*read-line-breaks*
                   '"reading a line"
                   _port12604_))
                 (_c12608_ (read-char _port12604_)))
            (if (eqv? _c12608_ std/xml/ssax#char-return)
                (if (eqv? (peek-char _port12604_) '#\newline)
                    (read-char _port12604_)
                    '#f)
                '#f)
            _line12606_))))
  (define std/xml/ssax#read-text-line__0
    (lambda ()
      (let ((_port12615_ (current-input-port)))
        (std/xml/ssax#read-text-line__% _port12615_))))
  (define std/xml/ssax#read-text-line
    (lambda _g16693_
      (let ((_g16692_ (let () (declare (not safe)) (##length _g16693_))))
        (cond ((let () (declare (not safe)) (##fx= _g16692_ 0))
               (apply std/xml/ssax#read-text-line__0 _g16693_))
              ((let () (declare (not safe)) (##fx= _g16692_ 1))
               (apply std/xml/ssax#read-text-line__% _g16693_))
              (else
               (##raise-wrong-number-of-arguments-exception
                std/xml/ssax#read-text-line
                _g16693_))))))
  (define std/xml/ssax#read-string__%
    (lambda (_n12581_ _port12582_)
      (if (not (positive? _n12581_))
          '""
          (let ((_buffer12584_ (make-string _n12581_)))
            (let _loop12586_ ((_i12588_ '0) (_c12589_ (read-char _port12582_)))
              (if (eof-object? _c12589_)
                  (substring _buffer12584_ '0 _i12588_)
                  (let ((_i112591_ (+ '1 _i12588_)))
                    (string-set! _buffer12584_ _i12588_ _c12589_)
                    (if (= _i112591_ _n12581_)
                        _buffer12584_
                        (_loop12586_ _i112591_ (read-char _port12582_))))))))))
  (define std/xml/ssax#read-string__0
    (lambda (_n12596_)
      (let ((_port12598_ (current-input-port)))
        (std/xml/ssax#read-string__% _n12596_ _port12598_))))
  (define std/xml/ssax#read-string
    (lambda _g16695_
      (let ((_g16694_ (let () (declare (not safe)) (##length _g16695_))))
        (cond ((let () (declare (not safe)) (##fx= _g16694_ 1))
               (apply std/xml/ssax#read-string__0 _g16695_))
              ((let () (declare (not safe)) (##fx= _g16694_ 2))
               (apply std/xml/ssax#read-string__% _g16695_))
              (else
               (##raise-wrong-number-of-arguments-exception
                std/xml/ssax#read-string
                _g16695_))))))
  (define std/xml/ssax#MISCIO:find-string-from-port?
    (lambda (_str12546_ _<input-port>12547_ . _max-no-char12548_)
      (set! _max-no-char12548_
            (if (null? _max-no-char12548_) '#f (car _max-no-char12548_)))
      (letrec ((_no-chars-read12550_ '0)
               (_my-peek-char12551_
                (lambda ()
                  (if (or (not _max-no-char12548_)
                          (< _no-chars-read12550_ _max-no-char12548_))
                      (let ((_c12561_ (peek-char _<input-port>12547_)))
                        (if (eof-object? _c12561_) '#f _c12561_))
                      '#f)))
               (_next-char12552_
                (lambda ()
                  (read-char _<input-port>12547_)
                  (set! _no-chars-read12550_ (+ '1 _no-chars-read12550_))))
               (_match-1st-char12553_
                (lambda ()
                  (let ((_c12565_ (_my-peek-char12551_)))
                    (if (not _c12565_)
                        '#f
                        (begin
                          (_next-char12552_)
                          (if (char=? _c12565_ (string-ref _str12546_ '0))
                              (_match-other-chars12554_ '1)
                              (_match-1st-char12553_)))))))
               (_match-other-chars12554_
                (lambda (_pos-to-match12567_)
                  (if (>= _pos-to-match12567_ (string-length _str12546_))
                      _no-chars-read12550_
                      (let ((_c12569_ (_my-peek-char12551_)))
                        (if _c12569_
                            (if (not (char=? _c12569_
                                             (string-ref
                                              _str12546_
                                              _pos-to-match12567_)))
                                (_backtrack12555_ '1 _pos-to-match12567_)
                                (begin
                                  (_next-char12552_)
                                  (_match-other-chars12554_
                                   (+ '1 _pos-to-match12567_))))
                            '#f)))))
               (_backtrack12555_
                (lambda (_i12571_ _matched-substr-len12572_)
                  (let ((_j12574_ (- _matched-substr-len12572_ _i12571_)))
                    (if (<= _j12574_ '0)
                        (_match-1st-char12553_)
                        (let _loop12576_ ((_k12578_ '0))
                          (if (>= _k12578_ _j12574_)
                              (_match-other-chars12554_ _j12574_)
                              (if (char=? (string-ref _str12546_ _k12578_)
                                          (string-ref
                                           _str12546_
                                           (+ _i12571_ _k12578_)))
                                  (_loop12576_ (+ '1 _k12578_))
                                  (_backtrack12555_
                                   (+ '1 _i12571_)
                                   _matched-substr-len12572_)))))))))
        (_match-1st-char12553_))))
  (define std/xml/ssax#find-string-from-port?
    std/xml/ssax#MISCIO:find-string-from-port?)
  (define std/xml/ssax#make-xml-token
    (lambda (_kind12543_ _head12544_) (cons _kind12543_ _head12544_)))
  (define std/xml/ssax#xml-token? pair?)
  (define std/xml/ssax#string-whitespace?
    (lambda (_str12532_)
      (let ((_len12534_ (string-length _str12532_)))
        (if (zero? _len12534_)
            '#t
            (if (= '1 _len12534_)
                (char-whitespace? (string-ref _str12532_ '0))
                (if (= '2 _len12534_)
                    (if (char-whitespace? (string-ref _str12532_ '0))
                        (char-whitespace? (string-ref _str12532_ '1))
                        '#f)
                    (let _loop12536_ ((_i12538_ '0))
                      (let ((_$e12540_ (>= _i12538_ _len12534_)))
                        (if _$e12540_
                            _$e12540_
                            (if (char-whitespace?
                                 (string-ref _str12532_ _i12538_))
                                (_loop12536_ (+ '1 _i12538_))
                                '#f))))))))))
  (define std/xml/ssax#assq-values
    (lambda (_val12524_ _alist12525_)
      (let _loop12527_ ((_alist12529_ _alist12525_) (_scanned12530_ '()))
        (if (null? _alist12529_)
            (values '#f _scanned12530_)
            (if (equal? _val12524_ (caar _alist12529_))
                (values (car _alist12529_)
                        (append _scanned12530_ (cdr _alist12529_)))
                (_loop12527_
                 (cdr _alist12529_)
                 (cons (car _alist12529_) _scanned12530_)))))))
  (define std/xml/ssax#fold-right
    (lambda (_kons12514_ _knil12515_ _lis112516_)
      (let _recur12518_ ((_lis12520_ _lis112516_))
        (if (null? _lis12520_)
            _knil12515_
            (let ((_head12522_ (car _lis12520_)))
              (_kons12514_ _head12522_ (_recur12518_ (cdr _lis12520_))))))))
  (define std/xml/ssax#fold
    (lambda (_kons12505_ _knil12506_ _lis112507_)
      (let _lp12509_ ((_lis12511_ _lis112507_) (_ans12512_ _knil12506_))
        (if (null? _lis12511_)
            _ans12512_
            (_lp12509_
             (cdr _lis12511_)
             (_kons12505_ (car _lis12511_) _ans12512_))))))
  (define std/xml/ssax#ssax:S-chars
    (map std/xml/ssax#ascii->char '(32 10 9 13)))
  (define std/xml/ssax#ssax:skip-S
    (lambda (_port12503_)
      (std/xml/ssax#skip-while__% std/xml/ssax#ssax:S-chars _port12503_)))
  (define std/xml/ssax#ssax:ncname-starting-char?
    (lambda (_a-char12498_)
      (if (char? _a-char12498_)
          (let ((_$e12500_ (char-alphabetic? _a-char12498_)))
            (if _$e12500_ _$e12500_ (char=? '#\_ _a-char12498_)))
          '#f)))
  (define std/xml/ssax#ssax:read-NCName
    (lambda (_port12489_)
      (let* ((_first-char12491_ (peek-char _port12489_))
             (_$e12493_
              (std/xml/ssax#ssax:ncname-starting-char? _first-char12491_)))
        (if _$e12493_
            _$e12493_
            (std/xml/ssax#parser-error
             _port12489_
             '"XMLNS [4] for '"
             _first-char12491_
             '"'")))
      (string->symbol
       (std/xml/ssax#next-token-of__%
        (lambda (_c12496_)
          (if (eof-object? _c12496_)
              '#f
              (if (char-alphabetic? _c12496_)
                  _c12496_
                  (if (std/srfi/13#string-index__0 '"0123456789.-_" _c12496_)
                      _c12496_
                      '#f))))
        _port12489_))))
  (define std/xml/ssax#ssax:read-QName
    (lambda (_port12482_)
      (let* ((_prefix-or-localpart12484_
              (std/xml/ssax#ssax:read-NCName _port12482_))
             (_$e12486_ (peek-char _port12482_)))
        (if (eq? '#\: _$e12486_)
            (begin
              (read-char _port12482_)
              (cons _prefix-or-localpart12484_
                    (std/xml/ssax#ssax:read-NCName _port12482_)))
            _prefix-or-localpart12484_))))
  (define std/xml/ssax#ssax:Prefix-XML (string->symbol '"xml"))
  (define std/xml/ssax#name-compare
    (letrec ((_symbol-compare12474_
              (lambda (_symb112476_ _symb212477_)
                (if (eq? _symb112476_ _symb212477_)
                    '=
                    (if (string<?
                         (symbol->string _symb112476_)
                         (symbol->string _symb212477_))
                        '<
                        '>)))))
      (lambda (_name112479_ _name212480_)
        (if (symbol? _name112479_)
            (if (symbol? _name212480_)
                (_symbol-compare12474_ _name112479_ _name212480_)
                '<)
            (if (symbol? _name212480_)
                '>
                (if (eq? _name212480_ std/xml/ssax#ssax:largest-unres-name)
                    '<
                    (if (eq? _name112479_ std/xml/ssax#ssax:largest-unres-name)
                        '>
                        (if (eq? (car _name112479_) (car _name212480_))
                            (_symbol-compare12474_
                             (cdr _name112479_)
                             (cdr _name212480_))
                            (_symbol-compare12474_
                             (car _name112479_)
                             (car _name212480_))))))))))
  (define std/xml/ssax#ssax:largest-unres-name
    (cons (string->symbol '"#LARGEST-SYMBOL")
          (string->symbol '"#LARGEST-SYMBOL")))
  (define std/xml/ssax#ssax:read-markup-token
    (let ()
      (letrec ((_skip-comment7945_
                (lambda (_port12472_)
                  (std/xml/ssax#assert-curr-char__%
                   '(#\-)
                   '"XML [15], second dash"
                   _port12472_)
                  (if (not (std/xml/ssax#find-string-from-port?
                            '"-->"
                            _port12472_))
                      (std/xml/ssax#parser-error
                       _port12472_
                       '"XML [15], no -->")
                      '#!void)
                  (cons 'COMMENT '#f)))
               (_read-cdata7946_
                (lambda (_port7959_)
                  (let ((_$e9329_
                         (string=?
                          '"CDATA["
                          (std/xml/ssax#read-string__% '6 _port7959_))))
                    (if _$e9329_
                        _$e9329_
                        (begin
                          (std/xml/ssax#cerr
                           '"failed assertion: "
                           '(string=? "CDATA[" (read-string 6 port))
                           std/xml/ssax#nl
                           '"bindings"
                           '#\newline
                           'port
                           '": "
                           _port7959_
                           std/xml/ssax#nl)
                          (error '"assertion failure"))))
                  (cons 'CDSECT '#f))))
        (lambda (_port7948_)
          (std/xml/ssax#assert-curr-char__%
           '(#\<)
           '"start of the token"
           _port7948_)
          (let ((_$e7950_ (peek-char _port7948_)))
            (if (eq? '#\/ _$e7950_)
                (begin
                  (read-char _port7948_)
                  (let ((_$r7953_
                         (cons 'END
                               (std/xml/ssax#ssax:read-QName _port7948_))))
                    (std/xml/ssax#ssax:skip-S _port7948_)
                    (std/xml/ssax#assert-curr-char__%
                     '(#\>)
                     '"XML [42]"
                     _port7948_)
                    _$r7953_))
                (if (eq? '#\? _$e7950_)
                    (begin
                      (read-char _port7948_)
                      (cons 'PI (std/xml/ssax#ssax:read-NCName _port7948_)))
                    (if (eq? '#\! _$e7950_)
                        (let ((_$e7956_
                               (std/xml/ssax#peek-next-char__% _port7948_)))
                          (if (eq? '#\- _$e7956_)
                              (begin
                                (read-char _port7948_)
                                (_skip-comment7945_ _port7948_))
                              (if (eq? '#\[ _$e7956_)
                                  (begin
                                    (read-char _port7948_)
                                    (_read-cdata7946_ _port7948_))
                                  (cons 'DECL
                                        (std/xml/ssax#ssax:read-NCName
                                         _port7948_)))))
                        (cons 'START
                              (std/xml/ssax#ssax:read-QName
                               _port7948_))))))))))
  (define std/xml/ssax#ssax:skip-pi
    (lambda (_port7942_)
      (if (not (std/xml/ssax#find-string-from-port? '"?>" _port7942_))
          (std/xml/ssax#parser-error
           _port7942_
           '"Failed to find ?> terminating the PI")
          '#!void)))
  (define std/xml/ssax#ssax:read-pi-body-as-string
    (lambda (_port7935_)
      (std/xml/ssax#ssax:skip-S _port7935_)
      (std/srfi/13#string-concatenate/shared
       (let _loop7937_ ()
         (let ((_pi-fragment7940_
                (std/xml/ssax#next-token__%
                 '()
                 '(#\?)
                 '"reading PI content"
                 _port7935_)))
           (if (eqv? '#\> (std/xml/ssax#peek-next-char__% _port7935_))
               (begin (read-char _port7935_) (cons _pi-fragment7940_ '()))
               (cons _pi-fragment7940_ (cons '"?" (_loop7937_)))))))))
  (define std/xml/ssax#ssax:skip-internal-dtd
    (lambda (_port7933_)
      (if (not (std/xml/ssax#find-string-from-port? '"]>" _port7933_))
          (std/xml/ssax#parser-error
           _port7933_
           '"Failed to find ]> terminating the internal DTD subset")
          '#!void)))
  (define std/xml/ssax#ssax:read-cdata-body
    (let ((_cdata-delimiters7907_
           (list std/xml/ssax#char-return '#\newline '#\] '#\&)))
      (lambda (_port7909_ _str-handler7910_ _seed7911_)
        (let _loop7913_ ((_seed7915_ _seed7911_))
          (let* ((_fragment7917_
                  (std/xml/ssax#next-token__%
                   '()
                   _cdata-delimiters7907_
                   '"reading CDATA"
                   _port7909_))
                 (_$e7919_ (read-char _port7909_)))
            (if (eq? '#\newline _$e7919_)
                (_loop7913_
                 (_str-handler7910_ _fragment7917_ std/xml/ssax#nl _seed7915_))
                (if (eq? '#\] _$e7919_)
                    (if (not (eqv? (peek-char _port7909_) '#\]))
                        (_loop7913_
                         (_str-handler7910_ _fragment7917_ '"]" _seed7915_))
                        (let _check-after-second-braket7922_ ((_seed7924_
                                                               (if (std/xml/ssax#string-null?
;;<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
                            _fragment7917_)
                           _seed7915_
                           (_str-handler7910_ _fragment7917_ '"" _seed7915_))))
;;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
                          (let ((_$e7926_
                                 (std/xml/ssax#peek-next-char__% _port7909_)))
                            (if (eq? '#\> _$e7926_)
                                (begin (read-char _port7909_) _seed7924_)
                                (if (eq? '#\] _$e7926_)
                                    (_check-after-second-braket7922_
                                     (_str-handler7910_ '"]" '"" _seed7924_))
                                    (_loop7913_
                                     (_str-handler7910_
                                      '"]]"
                                      '""
                                      _seed7924_)))))))
                    (if (eq? '#\& _$e7919_)
                        (let ((_ent-ref7931_
                               (std/xml/ssax#next-token-of__%
                                (lambda (_c7929_)
                                  (if (not (eof-object? _c7929_))
                                      (if (char-alphabetic? _c7929_)
                                          _c7929_
                                          '#f)
                                      '#f))
                                _port7909_)))
                          (if (and (string=? '"gt" _ent-ref7931_)
                                   (eqv? (peek-char _port7909_) '#\;))
                              (begin
                                (read-char _port7909_)
                                (_loop7913_
                                 (_str-handler7910_
                                  _fragment7917_
                                  '">"
                                  _seed7915_)))
                              (_loop7913_
                               (_str-handler7910_
                                _ent-ref7931_
                                '""
                                (_str-handler7910_
                                 _fragment7917_
                                 '"&"
                                 _seed7915_)))))
                        (begin
                          (if (eqv? (peek-char _port7909_) '#\newline)
                              (read-char _port7909_)
                              '#!void)
                          (_loop7913_
                           (_str-handler7910_
                            _fragment7917_
                            std/xml/ssax#nl
                            _seed7915_)))))))))))
  (define std/xml/ssax#ssax:read-char-ref
    (lambda (_port7898_)
      (let* ((_base7900_
              (if (eqv? (peek-char _port7898_) '#\x)
                  (begin (read-char _port7898_) '16)
                  '10))
             (_name7902_
              (std/xml/ssax#next-token__% '() '(#\;) '"XML [66]" _port7898_))
             (_char-code7904_ (string->number _name7902_ _base7900_)))
        (read-char _port7898_)
        (if (integer? _char-code7904_)
            (integer->char _char-code7904_)
            (std/xml/ssax#parser-error
             _port7898_
             '"[wf-Legalchar] broken for '"
             _name7902_
             '"'")))))
  (define std/xml/ssax#ssax:predefined-parsed-entities
    (cons (cons (string->symbol '"amp") '"&")
          (cons (cons (string->symbol '"lt") '"<")
                (cons (cons (string->symbol '"gt") '">")
                      (cons (cons (string->symbol '"apos") '"'")
                            (cons (cons (string->symbol '"quot") '"\"")
                                  '()))))))
  (define std/xml/ssax#ssax:handle-parsed-entity
    (lambda (_port7871_
             _name7872_
             _entities7873_
             _content-handler7874_
             _str-handler7875_
             _seed7876_)
      (let ((_$e7878_ (assq _name7872_ _entities7873_)))
        (if _$e7878_
            ((lambda (_decl-entity7881_)
               (let ((_ent-body7883_ (cdr _decl-entity7881_))
                     (_new-entities7884_
                      (cons (cons _name7872_ '#f) _entities7873_)))
                 (if (string? _ent-body7883_)
                     (call-with-input-string
                      _ent-body7883_
                      (lambda (_port7886_)
                        (_content-handler7874_
                         _port7886_
                         _new-entities7884_
                         _seed7876_)))
                     (if (procedure? _ent-body7883_)
                         (let* ((_port7888_ (_ent-body7883_))
                                (_$r7890_
                                 (_content-handler7874_
                                  _port7888_
                                  _new-entities7884_
                                  _seed7876_)))
                           (close-input-port _port7888_)
                           _$r7890_)
                         (std/xml/ssax#parser-error
                          _port7871_
                          '"[norecursion] broken for "
                          _name7872_)))))
             _$e7878_)
            (let ((_$e7893_
                   (assq _name7872_
                         std/xml/ssax#ssax:predefined-parsed-entities)))
              (if _$e7893_
                  ((lambda (_decl-entity7896_)
                     (_str-handler7875_
                      (cdr _decl-entity7896_)
                      '""
                      _seed7876_))
                   _$e7893_)
                  (std/xml/ssax#parser-error
                   _port7871_
                   '"[wf-entdeclared] broken for "
                   _name7872_)))))))
  (define std/xml/ssax#make-empty-attlist (lambda () '()))
  (define std/xml/ssax#attlist-add
    (lambda (_attlist7864_ _name-value7865_)
      (if (null? _attlist7864_)
          (cons _name-value7865_ _attlist7864_)
          (let ((_$e7867_
                 (std/xml/ssax#name-compare
                  (car _name-value7865_)
                  (caar _attlist7864_))))
            (if (eq? '= _$e7867_)
                '#f
                (if (eq? '< _$e7867_)
                    (cons _name-value7865_ _attlist7864_)
                    (cons (car _attlist7864_)
                          (std/xml/ssax#attlist-add
                           (cdr _attlist7864_)
                           _name-value7865_))))))))
  (define std/xml/ssax#attlist-null? null?)
  (define std/xml/ssax#attlist-remove-top
    (lambda (_attlist7862_) (values (car _attlist7862_) (cdr _attlist7862_))))
  (define std/xml/ssax#attlist->alist (lambda (_attlist7860_) _attlist7860_))
  (define std/xml/ssax#attlist-fold std/xml/ssax#fold)
  (define std/xml/ssax#ssax:read-attributes
    (let ((_value-delimeters7814_
           (append std/xml/ssax#ssax:S-chars '(#\< #\&))))
      (letrec ((_read-attrib-value7816_
                (lambda (_delimiter7847_
                         _port7848_
                         _entities7849_
                         _prev-fragments7850_)
                  (let* ((_new-fragments7852_
                          (cons (std/xml/ssax#next-token__%
                                 '()
                                 (cons _delimiter7847_ _value-delimeters7814_)
                                 '"XML [10]"
                                 _port7848_)
                                _prev-fragments7850_))
                         (_cterm7854_ (read-char _port7848_)))
                    (if (or (eof-object? _cterm7854_)
                            (eqv? _cterm7854_ _delimiter7847_))
                        _new-fragments7852_
                        (if (eqv? _cterm7854_ std/xml/ssax#char-return)
                            (begin
                              (if (eqv? (peek-char _port7848_) '#\newline)
                                  (read-char _port7848_)
                                  '#!void)
                              (_read-attrib-value7816_
                               _delimiter7847_
                               _port7848_
                               _entities7849_
                               (cons '" " _new-fragments7852_)))
                            (if (memv _cterm7854_ std/xml/ssax#ssax:S-chars)
                                (_read-attrib-value7816_
                                 _delimiter7847_
                                 _port7848_
                                 _entities7849_
                                 (cons '" " _new-fragments7852_))
                                (if (eqv? _cterm7854_ '#\&)
                                    (if (eqv? (peek-char _port7848_) '#\#)
                                        (begin
                                          (read-char _port7848_)
                                          (_read-attrib-value7816_
                                           _delimiter7847_
                                           _port7848_
                                           _entities7849_
                                           (cons (string (std/xml/ssax#ssax:read-char-ref
                                                          _port7848_))
                                                 _new-fragments7852_)))
                                        (_read-attrib-value7816_
                                         _delimiter7847_
                                         _port7848_
                                         _entities7849_
                                         (_read-named-entity7817_
                                          _port7848_
                                          _entities7849_
                                          _new-fragments7852_)))
                                    (std/xml/ssax#parser-error
                                     _port7848_
                                     '"[CleanAttrVals] broken"))))))))
               (_read-named-entity7817_
                (lambda (_port7833_ _entities7834_ _fragments7835_)
                  (let ((_name7837_
                         (std/xml/ssax#ssax:read-NCName _port7833_)))
                    (std/xml/ssax#assert-curr-char__%
                     '(#\;)
                     '"XML [68]"
                     _port7833_)
                    (std/xml/ssax#ssax:handle-parsed-entity
                     _port7833_
                     _name7837_
                     _entities7834_
                     (lambda (_port7839_ _entities7840_ _fragments7841_)
                       (_read-attrib-value7816_
                        '*eof*
                        _port7839_
                        _entities7840_
                        _fragments7841_))
                     (lambda (_str17843_ _str27844_ _fragments7845_)
                       (if (equal? '"" _str27844_)
                           (cons _str17843_ _fragments7845_)
                           (cons _str27844_
                                 (cons _str17843_ _fragments7845_))))
                     _fragments7835_)))))
        (lambda (_port7819_ _entities7820_)
          (let _loop7822_ ((_attr-list7824_ (std/xml/ssax#make-empty-attlist)))
            (if (not (std/xml/ssax#ssax:ncname-starting-char?
                      (std/xml/ssax#ssax:skip-S _port7819_)))
                _attr-list7824_
                (let ((_name7826_ (std/xml/ssax#ssax:read-QName _port7819_)))
                  (std/xml/ssax#ssax:skip-S _port7819_)
                  (std/xml/ssax#assert-curr-char__%
                   '(#\=)
                   '"XML [25]"
                   _port7819_)
                  (std/xml/ssax#ssax:skip-S _port7819_)
                  (let ((_delimiter7828_
                         (std/xml/ssax#assert-curr-char__%
                          '(#\' #\")
                          '"XML [10]"
                          _port7819_)))
                    (_loop7822_
                     (let ((_$e7830_
                            (std/xml/ssax#attlist-add
                             _attr-list7824_
                             (cons _name7826_
                                   (std/srfi/13#string-concatenate-reverse/shared__0
                                    (_read-attrib-value7816_
                                     _delimiter7828_
                                     _port7819_
                                     _entities7820_
                                     '()))))))
                       (if _$e7830_
                           _$e7830_
                           (std/xml/ssax#parser-error
                            _port7819_
                            '"[uniqattspec] broken for "
                            _name7826_))))))))))))
  (define std/xml/ssax#ssax:resolve-name
    (lambda (_port7804_
             _unres-name7805_
             _namespaces7806_
             _apply-default-ns?7807_)
      (if (pair? _unres-name7805_)
          (cons (let ((_$e7809_
                       (assq (car _unres-name7805_) _namespaces7806_)))
                  (if _$e7809_
                      (cadr _$e7809_)
                      (if (eq? (car _unres-name7805_)
                               std/xml/ssax#ssax:Prefix-XML)
                          std/xml/ssax#ssax:Prefix-XML
                          (std/xml/ssax#parser-error
                           _port7804_
                           '"[nsc-NSDeclared] broken; prefix "
                           (car _unres-name7805_)))))
                (cdr _unres-name7805_))
          (if _apply-default-ns?7807_
              (let ((_default-ns7812_ (assq '*DEFAULT* _namespaces7806_)))
                (if (and _default-ns7812_ (cadr _default-ns7812_))
                    (cons (cadr _default-ns7812_) _unres-name7805_)
                    _unres-name7805_))
              _unres-name7805_))))
  (define std/xml/ssax#ssax:uri-string->symbol
    (lambda (_uri-str7802_) (string->symbol _uri-str7802_)))
  (define std/xml/ssax#ssax:complete-start-tag
    (let ((_xmlns7698_ (string->symbol '"xmlns"))
          (_largest-dummy-decl-attr7699_
           (list std/xml/ssax#ssax:largest-unres-name '#f '#f '#f)))
      (letrec ((_validate-attrs7701_
                (lambda (_port7756_ _attlist7757_ _decl-attrs7758_)
                  (letrec ((_add-default-decl7760_
                            (lambda (_decl-attr7793_ _result7794_)
                              (let ((_g16696_ (apply values _decl-attr7793_)))
                                (begin
                                  (let ((_g16697_
                                         (let ()
                                           (declare (not safe))
                                           (if (##values? _g16696_)
                                               (##vector-length _g16696_)
                                               1))))
                                    (if (not (let ()
                                               (declare (not safe))
                                               (##fx= _g16697_ 4)))
                                        (error "Context expects 4 values"
                                               _g16697_)))
                                  (let ((_attr-name7796_
                                         (let ()
                                           (declare (not safe))
                                           (##vector-ref _g16696_ 0)))
                                        (_content-type7797_
                                         (let ()
                                           (declare (not safe))
                                           (##vector-ref _g16696_ 1)))
                                        (_use-type7798_
                                         (let ()
                                           (declare (not safe))
                                           (##vector-ref _g16696_ 2)))
                                        (_default-value7799_
                                         (let ()
                                           (declare (not safe))
                                           (##vector-ref _g16696_ 3))))
                                    (let ()
                                      (if (eq? _use-type7798_ 'REQUIRED)
                                          (std/xml/ssax#parser-error
                                           _port7756_
                                           '"[RequiredAttr] broken for"
                                           _attr-name7796_)
                                          '#f)
                                      (if _default-value7799_
                                          (cons (cons _attr-name7796_
                                                      _default-value7799_)
                                                _result7794_)
                                          _result7794_))))))))
                    (let _loop7762_ ((_attlist7764_ _attlist7757_)
                                     (_decl-attrs7765_ _decl-attrs7758_)
                                     (_result7766_ '()))
                      (if (std/xml/ssax#attlist-null? _attlist7764_)
                          (std/xml/ssax#attlist-fold
                           _add-default-decl7760_
                           _result7766_
                           _decl-attrs7765_)
                          (let ((_g16698_
                                 (std/xml/ssax#attlist-remove-top
                                  _attlist7764_)))
                            (begin
                              (let ((_g16699_
                                     (let ()
                                       (declare (not safe))
                                       (if (##values? _g16698_)
                                           (##vector-length _g16698_)
                                           1))))
                                (if (not (let ()
                                           (declare (not safe))
                                           (##fx= _g16699_ 2)))
                                    (error "Context expects 2 values"
                                           _g16699_)))
                              (let ((_attr7768_
                                     (let ()
                                       (declare (not safe))
                                       (##vector-ref _g16698_ 0)))
                                    (_attr-others7769_
                                     (let ()
                                       (declare (not safe))
                                       (##vector-ref _g16698_ 1))))
                                (let ((_g16700_
                                       (if (std/xml/ssax#attlist-null?
                                            _decl-attrs7765_)
                                           (values _largest-dummy-decl-attr7699_
                                                   _decl-attrs7765_)
                                           (std/xml/ssax#attlist-remove-top
                                            _decl-attrs7765_))))
                                  (begin
                                    (let ((_g16701_
                                           (let ()
                                             (declare (not safe))
                                             (if (##values? _g16700_)
                                                 (##vector-length _g16700_)
                                                 1))))
                                      (if (not (let ()
                                                 (declare (not safe))
                                                 (##fx= _g16701_ 2)))
                                          (error "Context expects 2 values"
                                                 _g16701_)))
                                    (let ((_decl-attr7771_
                                           (let ()
                                             (declare (not safe))
                                             (##vector-ref _g16700_ 0)))
                                          (_other-decls7772_
                                           (let ()
                                             (declare (not safe))
                                             (##vector-ref _g16700_ 1))))
                                      (let ()
                                        (let ((_$e7775_
                                               (std/xml/ssax#name-compare
                                                (car _attr7768_)
                                                (car _decl-attr7771_))))
                                          (if (eq? '< _$e7775_)
                                              (if (or (eq? _xmlns7698_
                                                           (car _attr7768_))
                                                      (and (pair? (car _attr7768_))
                                                           (eq? _xmlns7698_
                                                                (caar _attr7768_))))
                                                  (_loop7762_
                                                   _attr-others7769_
                                                   _decl-attrs7765_
                                                   (cons _attr7768_
                                                         _result7766_))
                                                  (std/xml/ssax#parser-error
                                                   _port7756_
                                                   '"[ValueType] broken for "
                                                   _attr7768_))
                                              (if (eq? '> _$e7775_)
                                                  (_loop7762_
                                                   _attlist7764_
                                                   _other-decls7772_
                                                   (_add-default-decl7760_
                                                    _decl-attr7771_
                                                    _result7766_))
                                                  (let ((_g16702_
                                                         (apply values
                                                                _decl-attr7771_)))
                                                    (begin
                                                      (let ((_g16703_
                                                             (let ()
                                                               (declare
;;<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
                         (not safe))
                       (if (##values? _g16702_)
                           (##vector-length _g16702_)
                           1))))
                (if (not (let () (declare (not safe)) (##fx= _g16703_ 4)))
                    (error "Context expects 4 values" _g16703_)))
              (let ((_attr-name7781_
                     (let () (declare (not safe)) (##vector-ref _g16702_ 0)))
                    (_content-type7782_
                     (let () (declare (not safe)) (##vector-ref _g16702_ 1)))
                    (_use-type7783_
                     (let () (declare (not safe)) (##vector-ref _g16702_ 2)))
                    (_default-value7784_
                     (let () (declare (not safe)) (##vector-ref _g16702_ 3))))
                (let ()
                  (if (eq? _use-type7783_ 'FIXED)
                      (let ((_$e7787_
                             (equal? (cdr _attr7768_) _default-value7784_)))
                        (if _$e7787_
                            _$e7787_
                            (std/xml/ssax#parser-error
                             _port7756_
                             '"[FixedAttr] broken for "
                             _attr-name7781_)))
                      (if (eq? _content-type7782_ 'CDATA)
                          '#t
                          (if (pair? _content-type7782_)
                              (let ((_$e7790_
                                     (member (cdr _attr7768_)
                                             _content-type7782_)))
                                (if _$e7790_
                                    _$e7790_
                                    (std/xml/ssax#parser-error
                                     _port7756_
                                     '"[enum] broken for "
                                     _attr-name7781_
                                     '"="
                                     (cdr _attr7768_))))
                              '#!void)))
                  (_loop7762_
                   _attr-others7769_
                   _other-decls7772_
                   (cons _attr7768_ _result7766_)))))))))))))))))))))
;;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
               (_add-ns7702_
                (lambda (_port7745_
                         _prefix7746_
                         _uri-str7747_
                         _namespaces7748_)
                  (if (equal? '"" _uri-str7747_)
                      (std/xml/ssax#parser-error
                       _port7745_
                       '"[dt-NSName] broken for "
                       _prefix7746_)
                      '#f)
                  (let ((_uri-symbol7750_ (string->symbol _uri-str7747_)))
                    (let _loop7752_ ((_nss7754_ _namespaces7748_))
                      (if (null? _nss7754_)
                          (cons (cons _prefix7746_
                                      (cons _uri-symbol7750_ _uri-symbol7750_))
                                _namespaces7748_)
                          (if (eq? _uri-symbol7750_ (cddar _nss7754_))
                              (cons (cons _prefix7746_
                                          (cons (cadar _nss7754_)
                                                _uri-symbol7750_))
                                    _namespaces7748_)
                              (_loop7752_ (cdr _nss7754_))))))))
               (_adjust-namespace-decl7703_
                (lambda (_port7735_ _attrs7736_ _namespaces7737_)
                  (let _loop7739_ ((_attrs7741_ _attrs7736_)
                                   (_proper-attrs7742_ '())
                                   (_namespaces7743_ _namespaces7737_))
                    (if (null? _attrs7741_)
                        (values _proper-attrs7742_ _namespaces7743_)
                        (if (eq? _xmlns7698_ (caar _attrs7741_))
                            (_loop7739_
                             (cdr _attrs7741_)
                             _proper-attrs7742_
                             (if (equal? '"" (cdar _attrs7741_))
                                 (cons (cons '*DEFAULT* (cons '#f '#f))
                                       _namespaces7743_)
                                 (_add-ns7702_
                                  _port7735_
                                  '*DEFAULT*
                                  (cdar _attrs7741_)
                                  _namespaces7743_)))
                            (if (and (pair? (caar _attrs7741_))
                                     (eq? _xmlns7698_ (caaar _attrs7741_)))
                                (_loop7739_
                                 (cdr _attrs7741_)
                                 _proper-attrs7742_
                                 (_add-ns7702_
                                  _port7735_
                                  (cdaar _attrs7741_)
                                  (cdar _attrs7741_)
                                  _namespaces7743_))
                                (_loop7739_
                                 (cdr _attrs7741_)
                                 (cons (car _attrs7741_) _proper-attrs7742_)
                                 _namespaces7743_))))))))
        (lambda (_tag-head7705_
                 _port7706_
                 _elems7707_
                 _entities7708_
                 _namespaces7709_)
          (let* ((_attlist7711_
                  (std/xml/ssax#ssax:read-attributes
                   _port7706_
                   _entities7708_))
                 (_empty-el-tag?7713_
                  (begin
                    (std/xml/ssax#ssax:skip-S _port7706_)
                    (if (eqv? '#\/
                              (std/xml/ssax#assert-curr-char__%
                               '(#\> #\/)
                               '"XML [40], XML [44], no '>'"
                               _port7706_))
                        (std/xml/ssax#assert-curr-char__%
                         '(#\>)
                         '"XML [44], no '>'"
                         _port7706_)
                        '#f)))
                 (_g16704_
                  (if _elems7707_
                      (let ((_$e7715_ (assoc _tag-head7705_ _elems7707_)))
                        (if _$e7715_
                            ((lambda (_decl-elem7718_)
                               (values (if _empty-el-tag?7713_
                                           'EMPTY-TAG
                                           (cadr _decl-elem7718_))
                                       (caddr _decl-elem7718_)))
                             _$e7715_)
                            (std/xml/ssax#parser-error
                             _port7706_
                             '"[elementvalid] broken, no decl for "
                             _tag-head7705_)))
                      (values (if _empty-el-tag?7713_ 'EMPTY-TAG 'ANY) '#f))))
            (begin
              (let ((_g16705_
                     (let ()
                       (declare (not safe))
                       (if (##values? _g16704_)
                           (##vector-length _g16704_)
                           1))))
                (if (not (let () (declare (not safe)) (##fx= _g16705_ 2)))
                    (error "Context expects 2 values" _g16705_)))
              (let ((_elem-content7720_
                     (let () (declare (not safe)) (##vector-ref _g16704_ 0)))
                    (_decl-attrs7721_
                     (let () (declare (not safe)) (##vector-ref _g16704_ 1))))
                (let* ((_merged-attrs7723_
                        (if _decl-attrs7721_
                            (_validate-attrs7701_
                             _port7706_
                             _attlist7711_
                             _decl-attrs7721_)
                            (std/xml/ssax#attlist->alist _attlist7711_)))
                       (_g16706_
                        (_adjust-namespace-decl7703_
                         _port7706_
                         _merged-attrs7723_
                         _namespaces7709_)))
                  (begin
                    (let ((_g16707_
                           (let ()
                             (declare (not safe))
                             (if (##values? _g16706_)
                                 (##vector-length _g16706_)
                                 1))))
                      (if (not (let ()
                                 (declare (not safe))
                                 (##fx= _g16707_ 2)))
                          (error "Context expects 2 values" _g16707_)))
                    (let ((_proper-attrs7725_
                           (let ()
                             (declare (not safe))
                             (##vector-ref _g16706_ 0)))
                          (_namespaces7726_
                           (let ()
                             (declare (not safe))
                             (##vector-ref _g16706_ 1))))
                      (let ()
                        (values (std/xml/ssax#ssax:resolve-name
                                 _port7706_
                                 _tag-head7705_
                                 _namespaces7726_
                                 '#t)
                                (std/xml/ssax#fold-right
                                 (lambda (_name-value7729_ _attlist7730_)
                                   (let ((_$e7732_
                                          (std/xml/ssax#attlist-add
                                           _attlist7730_
                                           (cons (std/xml/ssax#ssax:resolve-name
                                                  _port7706_
                                                  (car _name-value7729_)
                                                  _namespaces7726_
                                                  '#f)
                                                 (cdr _name-value7729_)))))
                                     (if _$e7732_
                                         _$e7732_
                                         (std/xml/ssax#parser-error
                                          _port7706_
                                          '"[uniqattspec] after NS expansion broken for "
                                          _name-value7729_))))
                                 (std/xml/ssax#make-empty-attlist)
                                 _proper-attrs7725_)
                                _namespaces7726_
                                _elem-content7720_))))))))))))
  (define std/xml/ssax#ssax:read-external-id
    (lambda (_port7684_)
      (let ((_discriminator7686_ (std/xml/ssax#ssax:read-NCName _port7684_)))
        (std/xml/ssax#assert-curr-char__%
         std/xml/ssax#ssax:S-chars
         '"space after SYSTEM or PUBLIC"
         _port7684_)
        (std/xml/ssax#ssax:skip-S _port7684_)
        (let ((_delimiter7688_
               (std/xml/ssax#assert-curr-char__%
                '(#\' #\")
                '"XML [11], XML [12]"
                _port7684_)))
          (if (eq? _discriminator7686_ (string->symbol '"SYSTEM"))
              (let ((_$r7690_
                     (std/xml/ssax#next-token__%
                      '()
                      (list _delimiter7688_)
                      '"XML [11]"
                      _port7684_)))
                (read-char _port7684_)
                _$r7690_)
              (if (eq? _discriminator7686_ (string->symbol '"PUBLIC"))
                  (begin
                    (std/xml/ssax#skip-until__%
                     (list _delimiter7688_)
                     _port7684_)
                    (std/xml/ssax#assert-curr-char__%
                     std/xml/ssax#ssax:S-chars
                     '"space after PubidLiteral"
                     _port7684_)
                    (std/xml/ssax#ssax:skip-S _port7684_)
                    (let* ((_delimiter7693_
                            (std/xml/ssax#assert-curr-char__%
                             '(#\' #\")
                             '"XML [11]"
                             _port7684_))
                           (_systemid7695_
                            (std/xml/ssax#next-token__%
                             '()
                             (list _delimiter7693_)
                             '"XML [11]"
                             _port7684_)))
                      (read-char _port7684_)
                      _systemid7695_))
                  (std/xml/ssax#parser-error
                   _port7684_
                   '"XML [75], "
                   _discriminator7686_
                   '" rather than SYSTEM or PUBLIC")))))))
  (define std/xml/ssax#ssax:scan-Misc
    (lambda (_port7667_)
      (let _loop7669_ ((_c7671_ (std/xml/ssax#ssax:skip-S _port7667_)))
        (if (eof-object? _c7671_)
            _c7671_
            (if (not (char=? _c7671_ '#\<))
                (std/xml/ssax#parser-error
                 _port7667_
                 '"XML [22], char '"
                 _c7671_
                 '"' unexpected")
                (let* ((_token7673_
                        (std/xml/ssax#ssax:read-markup-token _port7667_))
                       (_$e7675_ (car _token7673_)))
                  (if (eq? 'COMMENT _$e7675_)
                      (_loop7669_ (std/xml/ssax#ssax:skip-S _port7667_))
                      (if (or (eq? 'PI _$e7675_)
                              (eq? 'DECL _$e7675_)
                              (eq? 'START _$e7675_))
                          _token7673_
                          (std/xml/ssax#parser-error
                           _port7667_
                           '"XML [22], unexpected token of kind "
                           (car _token7673_))))))))))
  (define std/xml/ssax#ssax:read-char-data
    (let ((_terminators-usual7624_ (list '#\< '#\& std/xml/ssax#char-return))
          (_terminators-usual-eof7625_
           (list '#\< '*eof* '#\& std/xml/ssax#char-return))
          (_handle-fragment7626_
           (lambda (_fragment7620_ _str-handler7621_ _seed7622_)
             (if (std/xml/ssax#string-null? _fragment7620_)
                 _seed7622_
                 (_str-handler7621_ _fragment7620_ '"" _seed7622_)))))
      (lambda (_port7628_ _expect-eof?7629_ _str-handler7630_ _seed7631_)
        (if (eqv? '#\< (peek-char _port7628_))
            (let* ((_token7633_
                    (std/xml/ssax#ssax:read-markup-token _port7628_))
                   (_$e7635_ (car _token7633_)))
              (if (or (eq? 'START _$e7635_) (eq? 'END _$e7635_))
                  (values _seed7631_ _token7633_)
                  (if (eq? 'CDSECT _$e7635_)
                      (let ((_seed7641_
                             (std/xml/ssax#ssax:read-cdata-body
                              _port7628_
                              _str-handler7630_
                              _seed7631_)))
                        (std/xml/ssax#ssax:read-char-data
                         _port7628_
                         _expect-eof?7629_
                         _str-handler7630_
                         _seed7641_))
                      (if (eq? 'COMMENT _$e7635_)
                          (std/xml/ssax#ssax:read-char-data
                           _port7628_
                           _expect-eof?7629_
                           _str-handler7630_
                           _seed7631_)
                          (values _seed7631_ _token7633_)))))
            (let ((_char-data-terminators7643_
                   (if _expect-eof?7629_
                       _terminators-usual-eof7625_
                       _terminators-usual7624_)))
              (let _loop7645_ ((_seed7647_ _seed7631_))
                (let* ((_fragment7649_
                        (std/xml/ssax#next-token__%
                         '()
                         _char-data-terminators7643_
                         '"reading char data"
                         _port7628_))
                       (_term-char7651_ (peek-char _port7628_)))
                  (if (eof-object? _term-char7651_)
                      (values (_handle-fragment7626_
                               _fragment7649_
                               _str-handler7630_
                               _seed7647_)
                              _term-char7651_)
                      (let ((_$e7654_ _term-char7651_))
                        (if (eq? '#\< _$e7654_)
                            (let* ((_token7657_
                                    (std/xml/ssax#ssax:read-markup-token
                                     _port7628_))
                                   (_$e7659_ (car _token7657_)))
                              (if (eq? 'CDSECT _$e7659_)
                                  (_loop7645_
                                   (std/xml/ssax#ssax:read-cdata-body
                                    _port7628_
                                    _str-handler7630_
                                    (_handle-fragment7626_
                                     _fragment7649_
                                     _str-handler7630_
                                     _seed7647_)))
                                  (if (eq? 'COMMENT _$e7659_)
                                      (_loop7645_
                                       (_handle-fragment7626_
                                        _fragment7649_
                                        _str-handler7630_
                                        _seed7647_))
                                      (values (_handle-fragment7626_
                                               _fragment7649_
                                               _str-handler7630_
                                               _seed7647_)
                                              _token7657_))))
                            (if (eq? '#\& _$e7654_)
                                (let ((_$e7662_
                                       (std/xml/ssax#peek-next-char__%
                                        _port7628_)))
                                  (if (eq? '#\# _$e7662_)
                                      (begin
                                        (read-char _port7628_)
                                        (_loop7645_
                                         (_str-handler7630_
                                          _fragment7649_
                                          (string (std/xml/ssax#ssax:read-char-ref
                                                   _port7628_))
                                          _seed7647_)))
                                      (let ((_name7665_
                                             (std/xml/ssax#ssax:read-NCName
                                              _port7628_)))
                                        (std/xml/ssax#assert-curr-char__%
                                         '(#\;)
                                         '"XML [68]"
                                         _port7628_)
                                        (values (_handle-fragment7626_
                                                 _fragment7649_
                                                 _str-handler7630_
                                                 _seed7647_)
                                                (cons 'ENTITY-REF
                                                      _name7665_)))))
                                (begin
                                  (if (eqv? (std/xml/ssax#peek-next-char__%
                                             _port7628_)
                                            '#\newline)
                                      (read-char _port7628_)
                                      '#!void)
                                  (_loop7645_
                                   (_str-handler7630_
                                    _fragment7649_
                                    (string '#\newline)
                                    _seed7647_))))))))))))))
  (define std/xml/ssax#ssax:assert-token
    (lambda (_token7612_ _kind7613_ _gi7614_ _error-cont7615_)
      (let ((_$e7617_
             (if (std/xml/ssax#xml-token? _token7612_)
                 (if (eq? _kind7613_ (car _token7612_))
                     (equal? _gi7614_ (cdr _token7612_))
                     '#f)
                 '#f)))
        (if _$e7617_
            _$e7617_
            (_error-cont7615_ _token7612_ _kind7613_ _gi7614_)))))
  (define std/xml/ssax#ssax:reverse-collect-str
    (lambda (_fragments7604_)
      (if (null? _fragments7604_)
          '()
          (if (null? (cdr _fragments7604_))
              _fragments7604_
              (let _loop7606_ ((_fragments7608_ _fragments7604_)
                               (_result7609_ '())
                               (_strs7610_ '()))
                (if (null? _fragments7608_)
                    (if (null? _strs7610_)
                        _result7609_
                        (cons (std/srfi/13#string-concatenate/shared
                               _strs7610_)
                              _result7609_))
                    (if (string? (car _fragments7608_))
                        (_loop7606_
                         (cdr _fragments7608_)
                         _result7609_
                         (cons (car _fragments7608_) _strs7610_))
                        (_loop7606_
                         (cdr _fragments7608_)
                         (cons (car _fragments7608_)
                               (if (null? _strs7610_)
                                   _result7609_
                                   (cons (std/srfi/13#string-concatenate/shared
                                          _strs7610_)
                                         _result7609_)))
                         '()))))))))
  (define std/xml/ssax#ssax:reverse-collect-str-drop-ws
    (lambda (_fragments7595_)
      (if (null? _fragments7595_)
          '()
          (if (null? (cdr _fragments7595_))
              (if (and (string? (car _fragments7595_))
                       (std/xml/ssax#string-whitespace? (car _fragments7595_)))
                  '()
                  _fragments7595_)
              (let _loop7597_ ((_fragments7599_ _fragments7595_)
                               (_result7600_ '())
                               (_strs7601_ '())
                               (_all-whitespace?7602_ '#t))
                (if (null? _fragments7599_)
                    (if _all-whitespace?7602_
                        _result7600_
                        (cons (std/srfi/13#string-concatenate/shared
                               _strs7601_)
                              _result7600_))
                    (if (string? (car _fragments7599_))
                        (_loop7597_
                         (cdr _fragments7599_)
                         _result7600_
                         (cons (car _fragments7599_) _strs7601_)
                         (if _all-whitespace?7602_
                             (std/xml/ssax#string-whitespace?
                              (car _fragments7599_))
                             '#f))
                        (_loop7597_
                         (cdr _fragments7599_)
                         (cons (car _fragments7599_)
                               (if _all-whitespace?7602_
                                   _result7600_
                                   (cons (std/srfi/13#string-concatenate/shared
                                          _strs7601_)
                                         _result7600_)))
                         '()
                         '#t))))))))
  (define std/xml/ssax#ssax:xml->sxml
    (lambda (_port2623_ _namespace-prefix-assig2624_)
      (letrec ((_namespaces2626_
                (map (lambda (_el2629_)
                       (cons '#f
                             (cons (car _el2629_)
                                   (string->symbol (cdr _el2629_)))))
                     _namespace-prefix-assig2624_))
               (_RES-NAME->SXML2627_
                (lambda (_res-name2631_)
                  (string->symbol
                   (string-append
                    (symbol->string (car _res-name2631_))
                    '":"
                    (symbol->string (cdr _res-name2631_)))))))
        (let ((_result7591_
               (reverse ((lambda (_port4658_ _seed4660_)
                           (letrec ((_handle-decl4663_
                                     (lambda (_port7557_
                                              _token-head7558_
                                              _seed7560_)
                                       (let ((_$e7562_
                                              (eq? (string->symbol '"DOCTYPE")
                                                   _token-head7558_)))
                                         (if _$e7562_
                                             _$e7562_
                                             (std/xml/ssax#parser-error
                                              _port7557_
                                              '"XML [22], expected DOCTYPE declaration, found "
                                              _token-head7558_)))
                                       (std/xml/ssax#assert-curr-char__%
                                        std/xml/ssax#ssax:S-chars
                                        '"XML [28], space after DOCTYPE"
                                        _port7557_)
                                       (std/xml/ssax#ssax:skip-S _port7557_)
                                       (let* ((_docname7565_
                                               (std/xml/ssax#ssax:read-QName
                                                _port7557_))
                                              (_systemid7568_
                                               (if (std/xml/ssax#ssax:ncname-starting-char?
                                                    (std/xml/ssax#ssax:skip-S
                                                     _port7557_))
                                                   (std/xml/ssax#ssax:read-external-id
                                                    _port7557_)
                                                   '#f))
                                              (_internal-subset?7571_
                                               (begin
                                                 (std/xml/ssax#ssax:skip-S
                                                  _port7557_)
                                                 (eqv? '#\[
                                                       (std/xml/ssax#assert-curr-char__%
                                                        '(#\> #\[)
                                                        '"XML [28], end-of-DOCTYPE"
                                                        _port7557_))))
                                              (_g16708_
                                               ((lambda (_port7574_
                                                         _docname7576_
                                                         _systemid7578_
                                                         _internal-subset?7580_
                                                         _seed7582_)
                                                  (if _internal-subset?7580_
                                                      (std/xml/ssax#ssax:skip-internal-dtd
                                                       _port7574_)
                                                      '#!void)
                                                  (values '#f
                                                          '()
                                                          _namespaces2626_
                                                          _seed7582_))
                                                _port7557_
                                                _docname7565_
                                                _systemid7568_
                                                _internal-subset?7571_
                                                _seed7560_)))
                                         (begin
                                           (let ((_g16709_
                                                  (let ()
                                                    (declare (not safe))
                                                    (if (##values? _g16708_)
                                                        (##vector-length
                                                         _g16708_)
                                                        1))))
                                             (if (not (let ()
                                                        (declare (not safe))
                                                        (##fx= _g16709_ 4)))
                                                 (error "Context expects 4 values"
                                                        _g16709_)))
                                           (let ((_elems7585_
                                                  (let ()
                                                    (declare (not safe))
                                                    (##vector-ref _g16708_ 0)))
                                                 (_entities7586_
                                                  (let ()
                                                    (declare (not safe))
                                                    (##vector-ref _g16708_ 1)))
                                                 (_namespaces7587_
                                                  (let ()
                                                    (declare (not safe))
                                                    (##vector-ref _g16708_ 2)))
                                                 (_seed7588_
                                                  (let ()
                                                    (declare (not safe))
                                                    (##vector-ref
                                                     _g16708_
                                                     3))))
                                             (let ()
                                               (_scan-for-significant-prolog-token-24667_
                                                _port7557_
                                                _elems7585_
                                                _entities7586_
                                                _namespaces7587_
                                                _seed7588_)))))))
                                    (_scan-for-significant-prolog-token-14665_
                                     (lambda (_port6650_ _seed6651_)
                                       (let ((_token6653_
                                              (std/xml/ssax#ssax:scan-Misc
                                               _port6650_)))
                                         (if (eof-object? _token6653_)
                                             (std/xml/ssax#parser-error
                                              _port6650_
                                              '"XML [22], unexpected EOF")
                                             (let ((_$e6655_
                                                    (car _token6653_)))
                                               (if (eq? 'PI _$e6655_)
                                                   (let ((_seed7544_
                                                          ((lambda (_port7533_
;;<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
                            _target7534_
                            _seed7535_)
                     (let ((_$e7537_ _target7534_))
                       ((lambda (_port7540_ _pi-tag7541_ _seed7542_)
                          (cons (list '*PI*
                                      _pi-tag7541_
                                      (std/xml/ssax#ssax:read-pi-body-as-string
                                       _port7540_))
                                _seed7542_))
                        _port7533_
                        _target7534_
                        _seed7535_)))
                   _port6650_
                   (cdr _token6653_)
                   _seed6651_)))
;;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
                                                     (_scan-for-significant-prolog-token-14665_
                                                      _port6650_
                                                      _seed7544_))
                                                   (if (eq? 'DECL _$e6655_)
                                                       (_handle-decl4663_
                                                        _port6650_
                                                        (cdr _token6653_)
                                                        _seed6651_)
                                                       (if (eq? 'START
                                                                _$e6655_)
                                                           (let ((_g16710_
;;<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
                          ((lambda (_elem-gi7546_ _seed7548_)
                             (values '#f '() _namespaces2626_ _seed7548_))
                           (cdr _token6653_)
                           _seed6651_)))
                     (begin
                       (let ((_g16711_
                              (let ()
                                (declare (not safe))
                                (if (##values? _g16710_)
                                    (##vector-length _g16710_)
                                    1))))
                         (if (not (let ()
                                    (declare (not safe))
                                    (##fx= _g16711_ 4)))
                             (error "Context expects 4 values" _g16711_)))
                       (let ((_elems7551_
                              (let ()
                                (declare (not safe))
                                (##vector-ref _g16710_ 0)))
                             (_entities7552_
                              (let ()
                                (declare (not safe))
                                (##vector-ref _g16710_ 1)))
                             (_namespaces7553_
                              (let ()
                                (declare (not safe))
                                (##vector-ref _g16710_ 2)))
                             (_seed7554_
                              (let ()
                                (declare (not safe))
                                (##vector-ref _g16710_ 3))))
                         (let ()
                           (_element-parser4669_
                            (cdr _token6653_)
                            _port6650_
                            _elems7551_
                            _entities7552_
                            _namespaces7553_
                            '#f
                            _seed7554_)))))
                   (std/xml/ssax#parser-error
                    _port6650_
                    '"XML [22], unexpected markup "
                    _token6653_)))))))))
;;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
                                    (_scan-for-significant-prolog-token-24667_
                                     (lambda (_port5742_
                                              _elems5743_
                                              _entities5745_
                                              _namespaces5747_
                                              _seed5749_)
                                       (let ((_token5751_
                                              (std/xml/ssax#ssax:scan-Misc
                                               _port5742_)))
                                         (if (eof-object? _token5751_)
                                             (std/xml/ssax#parser-error
                                              _port5742_
                                              '"XML [22], unexpected EOF")
                                             (let ((_$e5754_
                                                    (car _token5751_)))
                                               (if (eq? 'PI _$e5754_)
                                                   (let ((_seed6643_
                                                          ((lambda (_port6632_
;;<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
                            _target6633_
                            _seed6634_)
                     (let ((_$e6636_ _target6633_))
                       ((lambda (_port6639_ _pi-tag6640_ _seed6641_)
                          (cons (list '*PI*
                                      _pi-tag6640_
                                      (std/xml/ssax#ssax:read-pi-body-as-string
                                       _port6639_))
                                _seed6641_))
                        _port6632_
                        _target6633_
                        _seed6634_)))
                   _port5742_
                   (cdr _token5751_)
                   _seed5749_)))
;;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
                                                     (_scan-for-significant-prolog-token-24667_
                                                      _port5742_
                                                      _elems5743_
                                                      _entities5745_
                                                      _namespaces5747_
                                                      _seed6643_))
                                                   (if (eq? 'START _$e5754_)
                                                       (_element-parser4669_
                                                        (cdr _token5751_)
                                                        _port5742_
                                                        _elems5743_
                                                        _entities5745_
                                                        _namespaces5747_
                                                        '#f
                                                        ((lambda (_elem-gi6645_
;;<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
                          _seed6647_)
                   _seed6647_)
                 (cdr _token5751_)
                 _seed5749_))
               (std/xml/ssax#parser-error
                _port5742_
                '"XML [22], unexpected markup "
                _token5751_))))))))
;;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
                                    (_element-parser4669_
                                     (lambda (_start-tag-head4672_
                                              _port4674_
                                              _elems4676_
                                              _entities4678_
                                              _namespaces4680_
                                              _preserve-ws?4682_
                                              _seed4684_)
                                       (letrec* ((_xml-space-gi4687_
                                                  (cons std/xml/ssax#ssax:Prefix-XML
                                                        (string->symbol
                                                         '"space"))))
                                         (let _handle-start-tag4690_ ((_start-tag-head4693_
;;<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
                               _start-tag-head4672_)
                              (_port4694_ _port4674_)
                              (_entities4695_ _entities4678_)
                              (_namespaces4696_ _namespaces4680_)
                              (_preserve-ws?4697_ _preserve-ws?4682_)
                              (_parent-seed4698_ _seed4684_))
;;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
                                           (let ((_g16712_
                                                  (std/xml/ssax#ssax:complete-start-tag
                                                   _start-tag-head4693_
                                                   _port4694_
                                                   _elems4676_
                                                   _entities4695_
                                                   _namespaces4696_)))
                                             (begin
                                               (let ((_g16713_
                                                      (let ()
                                                        (declare (not safe))
                                                        (if (##values?
                                                             _g16712_)
                                                            (##vector-length
                                                             _g16712_)
                                                            1))))
                                                 (if (not (let ()
                                                            (declare
                                                              (not safe))
                                                            (##fx= _g16713_
;;<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
                           4)))
;;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
                                                     (error "Context expects 4 values"
                                                            _g16713_)))
                                               (let ((_elem-gi4701_
                                                      (let ()
                                                        (declare (not safe))
                                                        (##vector-ref
                                                         _g16712_
                                                         0)))
                                                     (_attributes4703_
                                                      (let ()
                                                        (declare (not safe))
                                                        (##vector-ref
                                                         _g16712_
                                                         1)))
                                                     (_namespaces4705_
                                                      (let ()
                                                        (declare (not safe))
                                                        (##vector-ref
                                                         _g16712_
                                                         2)))
                                                     (_expected-content4706_
                                                      (let ()
                                                        (declare (not safe))
                                                        (##vector-ref
                                                         _g16712_
                                                         3))))
                                                 (let ((_seed4720_
                                                        ((lambda (_elem-gi4709_
;;<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
                          _attributes4711_
                          _namespaces4713_
                          _expected-content4715_
                          _seed4717_)
                   '())
                 _elem-gi4701_
                 _attributes4703_
                 _namespaces4705_
                 _expected-content4706_
                 _parent-seed4698_)))
;;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
                                                   (let ((_$e4723_
                                                          _expected-content4706_))
                                                     (if (eq? 'EMPTY-TAG
                                                              _$e4723_)
                                                         ((lambda (_elem-gi4726_
;;<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
                           _attributes4728_
                           _namespaces4730_
                           _parent-seed4732_
                           _seed4734_)
                    (let ((_seed4742_
                           (std/xml/ssax#ssax:reverse-collect-str-drop-ws
                            _seed4734_))
                          (_attrs4743_
                           (std/xml/ssax#attlist-fold
                            (lambda (_attr4737_ _accum4739_)
                              (cons (list (if (symbol? (car _attr4737_))
                                              (car _attr4737_)
                                              (_RES-NAME->SXML2627_
                                               (car _attr4737_)))
                                          (cdr _attr4737_))
                                    _accum4739_))
                            '()
                            _attributes4728_)))
                      (cons (cons (if (symbol? _elem-gi4726_)
                                      _elem-gi4726_
                                      (_RES-NAME->SXML2627_ _elem-gi4726_))
                                  (if (null? _attrs4743_)
                                      _seed4742_
                                      (cons (cons '@ _attrs4743_) _seed4742_)))
                            _parent-seed4732_)))
                  _elem-gi4701_
                  _attributes4703_
                  _namespaces4705_
                  _parent-seed4698_
                  _seed4720_)
                 (if (eq? 'EMPTY _$e4723_)
                     (begin
                       (std/xml/ssax#ssax:assert-token
                        (if (eqv? '#\< (std/xml/ssax#ssax:skip-S _port4694_))
                            (std/xml/ssax#ssax:read-markup-token _port4694_)
                            '#f)
                        'END
                        _start-tag-head4693_
                        (lambda (_token4746_ _exp-kind4748_ _exp-head4750_)
                          (std/xml/ssax#parser-error
                           _port4694_
                           '"[elementvalid] broken for "
                           _token4746_
                           '" while expecting "
                           _exp-kind4748_
                           _exp-head4750_)))
                       ((lambda (_elem-gi4753_
                                 _attributes4754_
                                 _namespaces4755_
                                 _parent-seed4756_
                                 _seed4757_)
                          (let ((_seed4762_
                                 (std/xml/ssax#ssax:reverse-collect-str-drop-ws
                                  _seed4757_))
                                (_attrs4763_
                                 (std/xml/ssax#attlist-fold
                                  (lambda (_attr4759_ _accum4760_)
                                    (cons (list (if (symbol? (car _attr4759_))
                                                    (car _attr4759_)
                                                    (_RES-NAME->SXML2627_
                                                     (car _attr4759_)))
                                                (cdr _attr4759_))
                                          _accum4760_))
                                  '()
                                  _attributes4754_)))
                            (cons (cons (if (symbol? _elem-gi4753_)
                                            _elem-gi4753_
                                            (_RES-NAME->SXML2627_
                                             _elem-gi4753_))
                                        (if (null? _attrs4763_)
                                            _seed4762_
                                            (cons (cons '@ _attrs4763_)
                                                  _seed4762_)))
                                  _parent-seed4756_)))
                        _elem-gi4701_
                        _attributes4703_
                        _namespaces4705_
                        _parent-seed4698_
                        _seed4720_))
                     (let ((_preserve-ws?4771_
                            (let ((_$e4765_
                                   (assoc _xml-space-gi4687_
                                          _attributes4703_)))
                              (if _$e4765_
                                  ((lambda (_name-value4768_)
                                     (equal? '"preserve"
                                             (cdr _name-value4768_)))
                                   _$e4765_)
                                  _preserve-ws?4697_))))
                       (let _loop4773_ ((_port4776_ _port4694_)
                                        (_entities4777_ _entities4695_)
                                        (_expect-eof?4778_ '#f)
                                        (_seed4780_ _seed4720_))
                         (let ((_g16714_
                                (std/xml/ssax#ssax:read-char-data
                                 _port4776_
                                 _expect-eof?4778_
                                 (lambda (_string14782_
                                          _string24784_
                                          _seed4786_)
                                   (if (std/xml/ssax#string-null?
                                        _string24784_)
                                       (cons _string14782_ _seed4786_)
                                       (cons _string24784_
                                             (cons _string14782_ _seed4786_))))
                                 _seed4780_)))
                           (begin
                             (let ((_g16715_
                                    (let ()
                                      (declare (not safe))
                                      (if (##values? _g16714_)
                                          (##vector-length _g16714_)
                                          1))))
                               (if (not (let ()
                                          (declare (not safe))
                                          (##fx= _g16715_ 2)))
                                   (error "Context expects 2 values"
                                          _g16715_)))
                             (let ((_seed4789_
                                    (let ()
                                      (declare (not safe))
                                      (##vector-ref _g16714_ 0)))
                                   (_term-token4790_
                                    (let ()
                                      (declare (not safe))
                                      (##vector-ref _g16714_ 1))))
                               (let ()
                                 (if (eof-object? _term-token4790_)
                                     _seed4789_
                                     (let ((_$e4794_ (car _term-token4790_)))
                                       (if (eq? 'END _$e4794_)
                                           (begin
                                             (std/xml/ssax#ssax:assert-token
                                              _term-token4790_
                                              'END
                                              _start-tag-head4693_
                                              (lambda (_token4797_
                                                       _exp-kind4798_
                                                       _exp-head4799_)
                                                (std/xml/ssax#parser-error
                                                 _port4776_
                                                 '"[GIMatch] broken for "
                                                 _term-token4790_
                                                 '" while expecting "
                                                 _exp-kind4798_
                                                 _exp-head4799_)))
                                             ((lambda (_elem-gi4801_
                                                       _attributes4802_
                                                       _namespaces4803_
                                                       _parent-seed4804_
                                                       _seed4805_)
                                                (let ((_seed4810_
                                                       (std/xml/ssax#ssax:reverse-collect-str-drop-ws
                                                        _seed4805_))
                                                      (_attrs4811_
                                                       (std/xml/ssax#attlist-fold
                                                        (lambda (_attr4807_
;;<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
                         _accum4808_)
                  (cons (list (if (symbol? (car _attr4807_))
                                  (car _attr4807_)
                                  (_RES-NAME->SXML2627_ (car _attr4807_)))
                              (cdr _attr4807_))
                        _accum4808_))
                '()
                _attributes4802_)))
;;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
                                                  (cons (cons (if (symbol? _elem-gi4801_)
;;<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
                          _elem-gi4801_
                          (_RES-NAME->SXML2627_ _elem-gi4801_))
                      (if (null? _attrs4811_)
                          _seed4810_
                          (cons (cons '@ _attrs4811_) _seed4810_)))
                _parent-seed4804_)))
;;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
                                              _elem-gi4701_
                                              _attributes4703_
                                              _namespaces4705_
                                              _parent-seed4698_
                                              _seed4789_))
                                           (if (eq? 'PI _$e4794_)
                                               (let ((_seed5728_
                                                      ((lambda (_port5714_
                                                                _target5715_
                                                                _seed5716_)
                                                         (let ((_$e5718_
                                                                _target5715_))
                                                           ((lambda (_port5721_
;;<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
                             _pi-tag5723_
                             _seed5725_)
                      (cons (list '*PI*
                                  _pi-tag5723_
                                  (std/xml/ssax#ssax:read-pi-body-as-string
                                   _port5721_))
                            _seed5725_))
                    _port5714_
                    _target5715_
                    _seed5716_)))
               _port4776_
               (cdr _term-token4790_)
               _seed4789_)))
;;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
                                                 (_loop4773_
                                                  _port4776_
                                                  _entities4777_
                                                  _expect-eof?4778_
                                                  _seed5728_))
                                               (if (eq? 'ENTITY-REF _$e4794_)
                                                   (let ((_seed5738_
                                                          (std/xml/ssax#ssax:handle-parsed-entity
                                                           _port4776_
                                                           (cdr _term-token4790_)
                                                           _entities4777_
                                                           (lambda (_port5730_
;;<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
                            _entities5731_
                            _seed5732_)
                     (_loop4773_ _port5730_ _entities5731_ '#t _seed5732_))
                   (lambda (_string15734_ _string25735_ _seed5736_)
                     (if (std/xml/ssax#string-null? _string25735_)
                         (cons _string15734_ _seed5736_)
                         (cons _string25735_ (cons _string15734_ _seed5736_))))
                   _seed4789_)))
;;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
                                                     (_loop4773_
                                                      _port4776_
                                                      _entities4777_
                                                      _expect-eof?4778_
                                                      _seed5738_))
                                                   (if (eq? 'START _$e4794_)
                                                       (begin
                                                         (if (eq? _expected-content4706_
;;<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
                          'PCDATA)
                     (std/xml/ssax#parser-error
                      _port4776_
                      '"[elementvalid] broken for "
                      _elem-gi4701_
                      '" with char content only; unexpected token "
                      _term-token4790_)
                     '#!void)
                 (let ((_seed5740_
                        (_handle-start-tag4690_
                         (cdr _term-token4790_)
                         _port4776_
                         _entities4777_
                         _namespaces4705_
                         _preserve-ws?4771_
                         _seed4789_)))
                   (_loop4773_
                    _port4776_
                    _entities4777_
                    _expect-eof?4778_
                    _seed5740_)))
               (std/xml/ssax#parser-error
                _port4776_
                '"XML [43] broken for "
                _term-token4790_)))))))))))))))))))))))))
;;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
;;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
                             (_scan-for-significant-prolog-token-14665_
                              _port4658_
                              _seed4660_)))
                         _port2623_
                         '()))))
          (cons '*TOP*
                (if (null? _namespace-prefix-assig2624_)
                    _result7591_
                    (cons (list '@
                                (cons '*NAMESPACES*
                                      (map (lambda (_ns7593_)
                                             (list (car _ns7593_)
                                                   (cdr _ns7593_)))
                                           _namespace-prefix-assig2624_)))
                          _result7591_)))))))
  (define std/xml/ssax#SSAX:XML->SXML std/xml/ssax#ssax:xml->sxml))
