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="AE" owner="ED" desc="Tests display=none on the defs element." status="accepted"
approved="yes"
version="$Revision: 1.4 $" testname="$RCSfile: struct-defs-201-t.svg,v $">
<d:OperatorScript xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/1999/xhtml">
<p>
Tests that the value of the display property on the defs element or on its descendants
doesn't prevent the elements from being referenced.
</p>
<p>
The test has passed if the following conditions are met:
</p>
<ol>
<li>there are 8 big rects visible each of a different color.</li>
<li>on top of the 8 big rects there are 8 circles that contain the reference color, the color of each circle must match the color of the rect to the right of its center</li>
<li>from the top-left to the top-right corner the colors must be: green, lime, yellow, olive.</li>
<li>from the bottom-left to the bottom-right corner the colors must be: navy, teal, blue, fuchsia.</li>
</ol>
</d:OperatorScript>
</SVGTestCase>
<title xml:id="test-title">$RCSfile: struct-defs-201-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 display="none">
<rect xml:id="r1" x="-50" y="-50" width="100" height="100" fill="currentColor"/>
<rect xml:id="r2" x="-50" y="-50" width="100" height="100" fill="currentColor" display="inline"/>
<rect xml:id="r3" x="-50" y="-50" width="100" height="100" fill="currentColor" display="none"/>
<g xml:id="g1" display="none">
<rect xml:id="r4" x="-50" y="-50" width="100" height="100" fill="currentColor"/>
<g xml:id="g2">
<use xml:id="u1" xlink:href="#r1" color="olive"/>
<use xml:id="u2" xlink:href="#r3" color="red"/>
<use xml:id="u3" xlink:href="#r1" transform="translate(-300 100)" color="navy"/>
<g xml:id="g3" display="none">
<use xml:id="u4" xlink:href="#r1" color="teal"/>
<use xml:id="u5" xlink:href="#r3" color="red" display="none"/>
<use xml:id="u6" xlink:href="#r1" transform="translate(100 0)" color="blue"/>
</g>
</g>
</g>
<use xml:id="u7" xlink:href="#r1"/>
</defs>
<g transform="translate(0 20)">
<use xlink:href="#r1" transform="translate(100 100)" color="green"/>
<!-- this should not be visible -->
<use xlink:href="#r3" transform="translate(100 100)" color="red"/>
<use xlink:href="#r2" transform="translate(200 100)" color="lime"/>
<use xlink:href="#r4" transform="translate(300 100)" color="yellow"/>
<!-- should show olive and navy rects -->
<use xlink:href="#g2" transform="translate(400 100)"/>
<use xlink:href="#u4" transform="translate(200 200)"/>
<use xlink:href="#u6" transform="translate(200 200)"/>
<use xlink:href="#u7" transform="translate(400 200)" color="fuchsia"/>
<!-- this should not be visible -->
<use xlink:href="#g3" transform="translate(200 200)" display="inline"/>
<circle cx="50" cy="50" r="25" fill="green"/>
<circle cx="150" cy="50" r="25" fill="lime"/>
<circle cx="250" cy="50" r="25" fill="yellow"/>
<circle cx="350" cy="50" r="25" fill="olive"/>
<circle cx="50" cy="250" r="25" fill="navy"/>
<circle cx="150" cy="250" r="25" fill="teal"/>
<circle cx="250" cy="250" r="25" fill="blue"/>
<circle cx="350" cy="250" r="25" fill="fuchsia"/>
</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.4 $</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>