Revision control
Copy as Markdown
<?xml version="1.0" encoding="UTF-8"?>
<svg version="1.2" baseProfile="tiny" xml:id="svg-root" width="100%" height="100%"
<!--======================================================================-->
<!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
<!--= Institute of Technology, European Research Consortium for =-->
<!--= Informatics and Mathematics (ERCIM), Keio University). =-->
<!--= All Rights Reserved. =-->
<!--======================================================================-->
reviewer="CL" owner="AG" desc="Tests external references and computed inherited values" status="accepted"
approved="yes"
version="$Revision: 1.2 $" testname="$RCSfile: struct-use-207-t.svg,v $">
<d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
<p>
This file is intented to test the computed values in external
references. Both files (referencing and referenced) define similar
colors/gradients via 'color', 'linearGradient' and 'radialGradient'.
The ids of those definitions are the same but the actual appearance are
different. These definitions are used to test the property inheritance
feature of SVG.
</p>
<p>
The top left rectangle should be filled with the blue linear gradient
since the 'use' has a specified value defined in the 'defs' section.
The top right rectangle is forestgreen since the 'use' has a computed
value. The bottom left rectangle is also forestgreen since the fill is
not inherited from the referenced element's original parent. The bottom
right rectangle is filled with the orange radial gradient since the
computed value is given by the CSS cascade.
</p>
</d:OperatorScript>
</SVGTestCase>
<title xml:id="test-title">$RCSfile: struct-use-207-t.svg,v $</title>
<defs>
<font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
<font-face-src>
<font-face-uri xlink:href="../images/SVGFreeSans.svg#ascii" />
</font-face-src>
</font-face>
</defs>
<g xml:id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
<defs>
<linearGradient xml:id="linearGrad1" gradientUnits="objectBoundingBox" y1="0" x1="0" y2="1" x2="1">
<stop offset="0" stop-color="blue" />
<stop offset="0.33" stop-color="white" />
<stop offset="0.5" stop-color="navy" />
<stop offset="0.66" stop-color="white" />
<stop offset="1.0" stop-color="blue" />
</linearGradient>
<radialGradient xml:id="radialGrad1" gradientUnits="objectBoundingBox" cx="0.5" cy="0.5" r="0.5">
<stop offset="0" stop-color="blue" />
<stop offset="0.33" stop-color="white" />
<stop offset="0.5" stop-color="navy" />
<stop offset="0.66" stop-color="white" />
<stop offset="1.0" stop-color="blue" />
</radialGradient>
</defs>
<g color="green">
<use xlink:href="../images/svgRef13.svg#rect1" fill="url(#linearGrad1)" />
<use xlink:href="../images/svgRef13.svg#rect2" fill="currentColor" />
<use xlink:href="../images/svgRef13.svg#rect3" />
<use xlink:href="../images/svgRef13.svg#rect4" />
<text font-size="24" x="240" y="35" text-anchor="middle">External references and computed values</text>
</g>
</g>
<g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
<text xml:id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.2 $</text>
</g>
<rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000" />
<!-- comment out this watermark once the test is approved -->
<!--<g xml:id="draft-watermark">
<rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1" />
<text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240" text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
</g>-->
</svg>