I'm quite new to xml and xsl, so this could be quite simple. I have an xml file with some data in it and an xsl file to process it into a web page. What doesn't work is hyperlinks. I've read endless pages about how xlink works, but for me it just doesn't. No errors, just plain text and no hyperlinks. I'm running Firefox 2.0.0.3 but have also tried in IE7, getting exactly the same result.
Here is some sample xml, lifted from w3schools and slightly massaged. I hope someone can point out where I'm going wrong.
Thanks
Rob
[html]<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" href="bookstore .xsl"?>
<bookstore xmlns:xlink="ht tp://www.w3.org/1999/xlink">
<book>
<description xlink:type="sim ple" xlink:href="../RPS/ComingUp.xml">
Text1
</description>
</book>
<book>
<description
xlink:type="sim ple"
xlink:href="htt p://www.cam.ac.uk"
xlink:show="new ">Text2</description>
</book>
</bookstore>[/html]
and some corresponding xsl
[html]<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:styleshe et version="1.0" xmlns:xsl="http ://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<html>
<head>
<meta http-equiv="Content-Language" content="en-gb"></meta>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252"></meta>
<title>Bookstor e</title>
<link rel="stylesheet " type="text/css" href="../rps.css"></link>
</head>
<body>
<xsl:for-each select="booksto re/book">
<xsl:value-of select="descrip tion"/><br/>
</xsl:for-each>
</body>
</html>
</xsl:template>
</xsl:stylesheet>[/html]
Waning: Please use html or code tags for source code. Thanks, moderator.
Here is some sample xml, lifted from w3schools and slightly massaged. I hope someone can point out where I'm going wrong.
Thanks
Rob
[html]<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" href="bookstore .xsl"?>
<bookstore xmlns:xlink="ht tp://www.w3.org/1999/xlink">
<book>
<description xlink:type="sim ple" xlink:href="../RPS/ComingUp.xml">
Text1
</description>
</book>
<book>
<description
xlink:type="sim ple"
xlink:href="htt p://www.cam.ac.uk"
xlink:show="new ">Text2</description>
</book>
</bookstore>[/html]
and some corresponding xsl
[html]<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:styleshe et version="1.0" xmlns:xsl="http ://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<html>
<head>
<meta http-equiv="Content-Language" content="en-gb"></meta>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252"></meta>
<title>Bookstor e</title>
<link rel="stylesheet " type="text/css" href="../rps.css"></link>
</head>
<body>
<xsl:for-each select="booksto re/book">
<xsl:value-of select="descrip tion"/><br/>
</xsl:for-each>
</body>
</html>
</xsl:template>
</xsl:stylesheet>[/html]
Waning: Please use html or code tags for source code. Thanks, moderator.
Comment