| 1 |
<?xml version="1.0" standalone="no"?> |
| 2 |
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" |
| 3 |
"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd"> |
| 4 |
|
| 5 |
<!-- |
| 6 |
Licensed to the Apache Software Foundation (ASF) under one or more |
| 7 |
contributor license agreements. See the NOTICE file distributed with |
| 8 |
this work for additional information regarding copyright ownership. |
| 9 |
The ASF licenses this file to You under the Apache License, Version 2.0 |
| 10 |
(the "License"); you may not use this file except in compliance with |
| 11 |
the License. You may obtain a copy of the License at |
| 12 |
|
| 13 |
http://www.apache.org/licenses/LICENSE-2.0 |
| 14 |
|
| 15 |
Unless required by applicable law or agreed to in writing, software |
| 16 |
distributed under the License is distributed on an "AS IS" BASIS, |
| 17 |
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 18 |
See the License for the specific language governing permissions and |
| 19 |
limitations under the License. |
| 20 |
--> |
| 21 |
|
| 22 |
<!-- ====================================================================== --> |
| 23 |
<!-- xml:base processing test. --> |
| 24 |
<!-- --> |
| 25 |
<!-- @author [email protected] --> |
| 26 |
<!-- @version $Id$ --> |
| 27 |
<!-- ====================================================================== --> |
| 28 |
|
| 29 |
<?xml-stylesheet type="text/css" href="../../resources/style/test.css" ?> |
| 30 |
|
| 31 |
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" id="body" width="450" height="500" viewBox="0 0 450 500"> |
| 32 |
|
| 33 |
<title>Test xml:base and styling</title> |
| 34 |
|
| 35 |
<!-- ============================================================= --> |
| 36 |
<!-- Test content --> |
| 37 |
<!-- ============================================================= --> |
| 38 |
<g id="testContent"> |
| 39 |
<text x="225" y="30" class="title">Test xml:base and styling</text> |
| 40 |
<text x="225" y="50" style="text-anchor:middle; font-size:12; font-style:italic">This file is using the defs.svg file to get the external resources</text> |
| 41 |
|
| 42 |
<!-- ############################### --> |
| 43 |
<style type="text/css" xml:base="../../resources/svg/" ><![CDATA[ |
| 44 |
.gradClass { |
| 45 |
fill: url(defs.svg#extGrad1); |
| 46 |
} |
| 47 |
]]></style> |
| 48 |
|
| 49 |
<defs> |
| 50 |
<g id="board"> |
| 51 |
<rect x="0" y="0" width="80" height="80" style="stroke:black; fill:none"/> |
| 52 |
<rect x="80" y="0" width="300" height="80" style="stroke:black; fill:#eee"/> |
| 53 |
</g> |
| 54 |
</defs> |
| 55 |
|
| 56 |
<use xlink:href="#board" x="40" y="70" /> |
| 57 |
<use xlink:href="#board" x="40" y="150" /> |
| 58 |
<use xlink:href="#board" x="40" y="230" /> |
| 59 |
<use xlink:href="#board" x="40" y="310" /> |
| 60 |
<use xlink:href="#board" x="40" y="390" /> |
| 61 |
|
| 62 |
|
| 63 |
<!-- ############################### --> |
| 64 |
<!-- ############################### --> |
| 65 |
<g> |
| 66 |
<use xlink:href="../../resources/svg/defs.svg#xmlBaseStylingElement" x="80" y="110" class="gradClass"/> |
| 67 |
<text x="130" y="90">xml:base on <style></text> |
| 68 |
<text x="130" y="104">the base URI is: ../../resources/svg/</text> |
| 69 |
</g> |
| 70 |
|
| 71 |
<g xml:base="../../resources/svg/"> |
| 72 |
<use xlink:href="defs.svg#xmlBaseStylingElement" x="80" y="190" style="fill:url(defs.svg#extGrad1)" /> |
| 73 |
<text x="130" y="170">xml:base on <g> enclosing the <use></text> |
| 74 |
<text x="130" y="184">the base URI is: ../../resources/svg/</text> |
| 75 |
</g> |
| 76 |
|
| 77 |
<g xml:base="../../resources/svg/defs.svg"> |
| 78 |
<use xlink:href="#xmlBaseStylingElement" x="80" y="270" style="fill:url(#extGrad1)" /> |
| 79 |
<text x="130" y="250">xml:base on <g> enclosing the <use></text> |
| 80 |
<text x="130" y="264">the base URI is: ../../resources/svg/defs.svg</text> |
| 81 |
</g> |
| 82 |
|
| 83 |
<g xml:base="../../resources/svg/"> |
| 84 |
<g xml:base="defs.svg"> |
| 85 |
<use xlink:href="#xmlBaseStylingElement" x="80" y="350" style="fill:url(#extGrad1)" /> |
| 86 |
</g> |
| 87 |
<text x="130" y="330">xml:base on <g> enclosing a <g></text> |
| 88 |
<text x="130" y="344">the base URI is: ../../resources/svg/</text> |
| 89 |
|
| 90 |
|
| 91 |
<text x="130" y="363">xml:base on enclosed <g> enclosing the <use></text> |
| 92 |
<text x="130" y="377">the base URI is: defs.svg</text> |
| 93 |
</g> |
| 94 |
|
| 95 |
<g xml:base="../../resources/svg/"> |
| 96 |
<use xml:base="defs.svg" xlink:href="#xmlBaseStylingElement" x="80" y="430" style="fill:url(#extGrad1)" /> |
| 97 |
<text x="130" y="410">xml:base on <g> enclosing the <use></text> |
| 98 |
<text x="130" y="424">the base URI is: ../../resources/svg/</text> |
| 99 |
|
| 100 |
<text x="130" y="443">xml:base on the <use></text> |
| 101 |
<text x="130" y="457">the base URI is: defs.svg</text> |
| 102 |
</g> |
| 103 |
</g> |
| 104 |
|
| 105 |
<!-- ============================================================= --> |
| 106 |
<!-- Batik sample mark --> |
| 107 |
<!-- ============================================================= --> |
| 108 |
<use xlink:href="../../../batikLogo.svg#Batik_Tag_Box" /> |
| 109 |
|
| 110 |
|
| 111 |
|
| 112 |
</svg> |