Test files for XML Base. Not part of build.

This commit is contained in:
heikki%citec.fi 2000-04-13 06:40:17 +00:00
parent 07b724802e
commit b8d33a4ce2
3 changed files with 152 additions and 0 deletions

View File

@ -0,0 +1,45 @@
/*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
*/
@namespace xlink url(http://www.w3.org/1999/xlink);
title {
font-weight: bold;
display: block;
}
xlink|link {
color: blue;
text-decoration: underline;
cursor: pointer;
display: inline;
padding-left: +5px;
}
sect1,sect2,sect3 {
display: block;
padding-left: +20px;
}
p {
display: block;
padding-left: +5px;
}

View File

@ -0,0 +1,45 @@
/*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
*/
@namespace xlink url(http://www.w3.org/1999/xlink);
title {
font-weight: bold;
display: block;
}
xlink|link {
color: blue;
text-decoration: underline;
cursor: pointer;
display: inline;
padding-left: +5px;
}
sect1,sect2,sect3 {
display: block;
padding-left: +20px;
}
p {
display: block;
padding-left: +5px;
}

View File

@ -0,0 +1,62 @@
<?xml version="1.0"?>
<?xml-stylesheet href="xmlbase.css" type="text/css"?>
<root xmlns:xlink="http://www.w3.org/1999/xlink">
<title>Root: no xml:base</title>
<xlink:link xlink:type="simple" xlink:href="a.xml">a.xml</xlink:link>
<p>Expected: &lt;current path>/a.xml</p>
<sect1 xml:base="http://www.mozilla.org">
<title>Sect1: xml:base="http://www.mozilla.org"</title>
<xlink:link xlink:type="simple" xlink:href="b.xml">b.xml</xlink:link>
<p>Expected: http://www.mozilla.org/b.xml</p>
<sect2 xml:base="/base">
<title>Sect2: xml:base="/base"</title>
<xlink:link xlink:type="simple" xlink:href="c.xml">c.xml</xlink:link>
<p>Expected: http://www.mozilla.org/base/c.xml</p>
<sect3 xml:base="">
<title>Sect3: xml:base=""</title>
<xlink:link xlink:type="simple" xlink:href="d.xml">d.xml</xlink:link>
<p>Expected: http://www.mozilla.org/base/d.xml</p>
</sect3>
<sect3 xml:base="/">
<title>Sect3: xml:base="/"</title>
<xlink:link xlink:type="simple" xlink:href="d-2.xml">d-2.xml</xlink:link>
<p>Expected: http://www.mozilla.org/d-2.xml</p>
</sect3>
<sect3 xml:base="/foobar">
<title>Sect3: xml:base="/foobar"</title>
<xlink:link xlink:type="simple" xlink:href="e.xml">e.xml</xlink:link>
<p>Expected: http://www.mozilla.org/foobar/e.xml</p>
</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>
<p>Expected: http://www.mozilla.org/base/ding/dong/f.xml</p>
</sect3>
</sect2>
<sect2 xml:base="http://www.netscape.com">
<title>Sect2: xml:base="http://www.netscape.com"</title>
<xlink:link xlink:type="simple" xlink:href="g.xml">g.xml</xlink:link>
<p>Expected: http://www.netscape.com/g.xml</p>
</sect2>
<sect2 xml:base="http://www.netscape.com">
<title>Sect2: xml:base="http://www.netscape.com"</title>
<xlink:link xlink:type="simple" xlink:href="http://www.mozilla.org/foobar/h.xml">http://www.mozilla.org/foobar/h.xml</xlink:link>
<p>Expected: http://www.mozilla.org/foobar/h.xml</p>
</sect2>
<sect2 xml:base="http://www.netscape.com">
<title>Sect2: xml:base="http://www.netscape.com"</title>
<xlink:link xlink:type="simple" xlink:href="i.xml" xml:base="wow">i.xml, this element has xml:base="wow"</xlink:link>
<p>Expected: http://www.netscape.com/wow/i.xml</p>
</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: &lt;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>
<p>Expected: file:///not/k.xml</p>
</sect1>
</root>