1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/content/xml/tests/xmlbase/xmlbase.xml Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,82 @@ 1.4 +<?xml version="1.0" encoding="ISO-8859-1"?> 1.5 +<?xml-stylesheet href="xmlbase.css" type="text/css"?> 1.6 +<root xmlns:xlink="http://www.w3.org/1999/xlink"> 1.7 +<title>Root: no xml:base</title> 1.8 +<xlink:link xlink:type="simple" xlink:href="a.xml">a.xml</xlink:link> 1.9 +<p>Expected: <current path>/a.xml</p> 1.10 +<sect1 xml:base="http://www.mozilla.org"> 1.11 + <title>Sect1: xml:base="http://www.mozilla.org"</title> 1.12 + <xlink:link xlink:type="simple" xlink:href="b.xml">b.xml</xlink:link> 1.13 + <p>Expected: http://www.mozilla.org/b.xml</p> 1.14 + <sect2 xml:base="/base"> 1.15 + <title>Sect2: xml:base="/base"</title> 1.16 + <xlink:link xlink:type="simple" xlink:href="c.xml">c.xml</xlink:link> 1.17 + <p>Expected: http://www.mozilla.org/base/c.xml</p> 1.18 + <sect3 xml:base=""> 1.19 + <title>Sect3: xml:base=""</title> 1.20 + <xlink:link xlink:type="simple" xlink:href="d.xml">d.xml</xlink:link> 1.21 + <p>Expected: http://www.mozilla.org/base/d.xml</p> 1.22 + </sect3> 1.23 + <sect3 xml:base="/"> 1.24 + <title>Sect3: xml:base="/"</title> 1.25 + <xlink:link xlink:type="simple" xlink:href="d-2.xml">d-2.xml</xlink:link> 1.26 + <p>Expected: http://www.mozilla.org/d-2.xml</p> 1.27 + </sect3> 1.28 + <sect3 xml:base="/foobar"> 1.29 + <title>Sect3: xml:base="/foobar"</title> 1.30 + <xlink:link xlink:type="simple" xlink:href="e.xml">e.xml</xlink:link> 1.31 + <p>Expected: http://www.mozilla.org/foobar/e.xml</p> 1.32 + </sect3> 1.33 + <sect3 xml:base="ding/dong"> 1.34 + <title>Sect3: xml:base="ding/dong"</title> 1.35 + <xlink:link xlink:type="simple" xlink:href="f.xml">f.xml</xlink:link> 1.36 + <p>Expected: http://www.mozilla.org/base/ding/dong/f.xml</p> 1.37 + </sect3> 1.38 + </sect2> 1.39 + <sect2 xml:base="http://www.netscape.com"> 1.40 + <title>Sect2: xml:base="http://www.netscape.com"</title> 1.41 + <xlink:link xlink:type="simple" xlink:href="g.xml">g.xml</xlink:link> 1.42 + <p>Expected: http://www.netscape.com/g.xml</p> 1.43 + </sect2> 1.44 + <sect2 xml:base="http://www.netscape.com"> 1.45 + <title>Sect2: xml:base="http://www.netscape.com"</title> 1.46 + <xlink:link xlink:type="simple" xlink:href="http://www.mozilla.org/foobar/h.xml">http://www.mozilla.org/foobar/h.xml</xlink:link> 1.47 + <p>Expected: http://www.mozilla.org/foobar/h.xml</p> 1.48 + </sect2> 1.49 + <sect2 xml:base="http://www.netscape.com"> 1.50 + <title>Sect2: xml:base="http://www.netscape.com"</title> 1.51 + <xlink:link xlink:type="simple" xlink:href="i.xml" xml:base="wow">i.xml, this element has xml:base="wow"</xlink:link> 1.52 + <p>Expected: http://www.netscape.com/wow/i.xml</p> 1.53 + </sect2> 1.54 +</sect1> 1.55 +<sect1 xml:base="nothere"> 1.56 + <title>Sect1: xml:base="nothere"</title> 1.57 + <xlink:link xlink:type="simple" xlink:href="j.xml">j.xml</xlink:link> 1.58 + <p>Expected: <current path>/nothere/j.xml</p> 1.59 +</sect1> 1.60 +<sect1 xml:base="/not"> 1.61 + <title>Sect1: xml:base="/not"</title> 1.62 + <xlink:link xlink:type="simple" xlink:href="k.xml">k.xml</xlink:link> 1.63 + <p>Expected: file:///not/k.xml</p> 1.64 +</sect1> 1.65 +<sect1 xml:base="http://foobar.com/ä ö/"> 1.66 + <title>Sect1: xml:base="http://foobar.com/ä ö/"</title> 1.67 + <xlink:link xlink:type="simple" xlink:href="l.xml">l.xml</xlink:link> 1.68 + <p>Expected: http://foobar.com/%E4%20%F6/l.xml</p> 1.69 +</sect1> 1.70 +<sect1 xml:base="http://foobar.com/ /%20/"> 1.71 + <title>Sect1: xml:base="http://foobar.com/ /%20/"</title> 1.72 + <xlink:link xlink:type="simple" xlink:href="m.xml">m.xml</xlink:link> 1.73 + <p>Expected: http://foobar.com/%20/%20/m.xml</p> 1.74 +</sect1> 1.75 +<sect1 xml:base="chrome://navigator"> 1.76 + <title>Sect1: xml:base="chrome://navigator"</title> 1.77 + <xlink:link xlink:type="simple" xlink:href="n.xml">n.xml</xlink:link> 1.78 + <p>Expected: |current path|/n.xml because chrome URL is not allowed</p> 1.79 + <sect2 xml:base="http://www.mozilla.org"> 1.80 + <title>Sect2: xml:base="http://www.mozilla.org"</title> 1.81 + <xlink:link xlink:type="simple" xlink:href="o.xml" xml:base="chrome://navigator">o.xml, this element has xml:base="chrome://navigator"</xlink:link> 1.82 + <p>Expected: http://www.mozilla.org/o.xml because chrome base is not allowed</p> 1.83 + </sect2> 1.84 +</sect1> 1.85 +</root> 1.86 \ No newline at end of file