~john-koepi/ubuntu/trusty/golang/default

« back to all changes in this revision

Viewing changes to src/pkg/xml/xml.go

  • Committer: Bazaar Package Importer
  • Author(s): Ondřej Surý
  • Date: 2011-08-03 17:04:59 UTC
  • mfrom: (14.1.2 sid)
  • Revision ID: james.westby@ubuntu.com-20110803170459-wzd99m3567y80ila
Tags: 1:59-1
* Imported Upstream version 59
* Refresh patches to a new release
* Fix FTBFS on ARM (Closes: #634270)
* Update version.bash to work with Debian packaging and not hg
  repository

Show diffs side-by-side

added added

removed removed

Lines of Context:
659
659
                        return nil, p.err
660
660
                }
661
661
                if b != '=' {
662
 
                        p.err = p.syntaxError("attribute name without = in element")
663
 
                        return nil, p.err
664
 
                }
665
 
                p.space()
666
 
                data := p.attrval()
667
 
                if data == nil {
668
 
                        return nil, p.err
669
 
                }
670
 
                a.Value = string(data)
 
662
                        if p.Strict {
 
663
                                p.err = p.syntaxError("attribute name without = in element")
 
664
                                return nil, p.err
 
665
                        } else {
 
666
                                p.ungetc(b)
 
667
                                a.Value = a.Name.Local
 
668
                        }
 
669
                } else {
 
670
                        p.space()
 
671
                        data := p.attrval()
 
672
                        if data == nil {
 
673
                                return nil, p.err
 
674
                        }
 
675
                        a.Value = string(data)
 
676
                }
671
677
        }
672
 
 
673
678
        if empty {
674
679
                p.needClose = true
675
680
                p.toClose = name