Source code
Revision control
Copy as Markdown
Other Tools
<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet href="xmlbase.css" type="text/css"?>
<title>Root: no xml:base</title>
<xlink:link xlink:type="simple" xlink:href="a.xml">a.xml</xlink:link>
<p>Expected: <current path>/a.xml</p>
<xlink:link xlink:type="simple" xlink:href="b.xml">b.xml</xlink:link>
<sect2 xml:base="/base">
<title>Sect2: xml:base="/base"</title>
<xlink:link xlink:type="simple" xlink:href="c.xml">c.xml</xlink:link>
<sect3 xml:base="">
<title>Sect3: xml:base=""</title>
<xlink:link xlink:type="simple" xlink:href="d.xml">d.xml</xlink:link>
</sect3>
<sect3 xml:base="/">
<title>Sect3: xml:base="/"</title>
<xlink:link xlink:type="simple" xlink:href="d-2.xml">d-2.xml</xlink:link>
</sect3>
<sect3 xml:base="/foobar">
<title>Sect3: xml:base="/foobar"</title>
<xlink:link xlink:type="simple" xlink:href="e.xml">e.xml</xlink:link>
</sect3>
<sect3 xml:base="ding/dong">
<title>Sect3: xml:base="ding/dong"</title>
<xlink:link xlink:type="simple" xlink:href="f.xml">f.xml</xlink:link>
</sect3>
</sect2>
<xlink:link xlink:type="simple" xlink:href="g.xml">g.xml</xlink:link>
</sect2>
<xlink:link xlink:type="simple" xlink:href="http://www.mozilla.org/foobar/h.xml">http://www.mozilla.org/foobar/h.xml</xlink:link>
</sect2>
<xlink:link xlink:type="simple" xlink:href="i.xml" xml:base="wow">i.xml, this element has xml:base="wow"</xlink:link>
</sect2>
</sect1>
<sect1 xml:base="nothere">
<title>Sect1: xml:base="nothere"</title>
<xlink:link xlink:type="simple" xlink:href="j.xml">j.xml</xlink:link>
<p>Expected: <current path>/nothere/j.xml</p>
</sect1>
<sect1 xml:base="/not">
<title>Sect1: xml:base="/not"</title>
<xlink:link xlink:type="simple" xlink:href="k.xml">k.xml</xlink:link>
</sect1>
<xlink:link xlink:type="simple" xlink:href="l.xml">l.xml</xlink:link>
</sect1>
<xlink:link xlink:type="simple" xlink:href="m.xml">m.xml</xlink:link>
</sect1>
<xlink:link xlink:type="simple" xlink:href="n.xml">n.xml</xlink:link>
<p>Expected: |current path|/n.xml because chrome URL is not allowed</p>
<xlink:link xlink:type="simple" xlink:href="o.xml" xml:base="chrome://navigator">o.xml, this element has xml:base="chrome://navigator"</xlink:link>
</sect2>
</sect1>
</root>