Specification link: 5.1 Defining an SVG document fragment: the 'svg' element

struct-frag-04-t ← index → struct-frag-06-t

Tests that contain the draft-watermark are under development and may be incorrectly testing a feature.

# struct-frag-05-t.svg
SVG Image | PNG Image

## Operator Script

Run the test and click on the "Valid" link.

## Pass Criteria

The test passes if the following conditions are met:

- A yellow circle is shown.
- A blue circle is not shown.
- The text "Valid" is shown in blue.
- The text "Invalid" is not shown.
- Clicking "Valid" navigates to the "TOC & index of linking tests" document, linkingToc-t.svg.

## Test Description

This tests that XML Namespaces are correctly implemented, in that the tuple of local name and namespace URI, rather than the prefix, is important.

The first subtest is a group where the namespace prefix s is bound to the SVG namespace and an s:circle is drawn in pale yellow. The same group declares the default namespace to be a non-SVG namespace; the blue circle element in that namespace must not be drawn.

The second subtest puts the namespace declarations on the elements themselves. The prefix toto is bound to the SVG namespace and the XLink namespace is made the default namespace. Thus, the blue <toto:a href="uri">Valid</toto:a> is a valid link and must be traversable. Select this link, then go back to the test.

The third subtest has no prefix on the element name 'a' and uses the usual xlink: prefix on the href attribute. However, both the default namespace and the namespace bound to the xlink prefix are dummy namespaces. Not only should the link not be traversable, it must not even display at all. If the text 'Invalid' is displayed, the test fails.

struct-frag-04-t ← index → struct-frag-06-t