Root: no xml:base a.xml

Expected: <current path>/a.xml

Sect1: xml:base="http://www.mozilla.org" b.xml

Expected: http://www.mozilla.org/b.xml

Sect2: xml:base="/base" c.xml

Expected: http://www.mozilla.org/base/c.xml

Sect3: xml:base="" d.xml

Expected: http://www.mozilla.org/base/d.xml

Sect3: xml:base="/" d-2.xml

Expected: http://www.mozilla.org/d-2.xml

Sect3: xml:base="/foobar" e.xml

Expected: http://www.mozilla.org/foobar/e.xml

Sect3: xml:base="ding/dong" f.xml

Expected: http://www.mozilla.org/base/ding/dong/f.xml

Sect2: xml:base="http://www.netscape.com" g.xml

Expected: http://www.netscape.com/g.xml

Sect2: xml:base="http://www.netscape.com" http://www.mozilla.org/foobar/h.xml

Expected: http://www.mozilla.org/foobar/h.xml

Sect2: xml:base="http://www.netscape.com" i.xml, this element has xml:base="wow"

Expected: http://www.netscape.com/wow/i.xml

Sect1: xml:base="nothere" j.xml

Expected: <current path>/nothere/j.xml

Sect1: xml:base="/not" k.xml

Expected: file:///not/k.xml

Sect1: xml:base="http://foobar.com/ä ö/" l.xml

Expected: http://foobar.com/%E4%20%F6/l.xml

Sect1: xml:base="http://foobar.com/ /%20/" m.xml

Expected: http://foobar.com/%20/%20/m.xml

Sect1: xml:base="chrome://navigator" n.xml

Expected: |current path|/n.xml because chrome URL is not allowed

Sect2: xml:base="http://www.mozilla.org" o.xml, this element has xml:base="chrome://navigator"

Expected: http://www.mozilla.org/o.xml because chrome base is not allowed