Scripting XML Elements

Internet Explorer provides limited support for scripting XML elements. For example, I can add an onclick event attribute to an XML element named <xlink> (we'll take a look at XLinks later in this book) in an XHTML document (we'll also take a look at XHTML later in this book):

Listing . ch07_12.html
 
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet TYPE="text/css" href="ch07_13.css"?>

<html>
    <head>
    </head>

    <body>
    Want to check out <xlink xml:link = "simple" inline="false"
					href = "http://www.w3c.org"
					onclick="location.href='http://www.w3c.org'">W3C</xlink>?
    </body>
</html>

I can specify in a stylesheet, ch07_13.css, that <xlink> elements should be displayed in blue and underlined as a hyperlink might appear. I can ...

Get Real World XML now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.