...

View Full Version : xlink help



capt_nemo777
11-23-2008, 03:39 AM
i have this simple xml code and i placed some xlink stuff


<?xml version="1.0" encoding="ISO-8859-1"?>
<Homepages xmlns:xlink="http://www.w3c.org/1999/xlink">
<homepage xlink:type="simple"
xlink:href="http://www.w3schools.com">Visit w3schools</homepage>
</Homepages>


but then when i run it on a browser, it just output the code itself :(

http://i36.tinypic.com/2ch5j7a.png

because of this, i created an xslt file to accompany the output


//xml with xsl stylesheet
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="xlink.xslt"?>
<Homepages xmlns:xlink="http://www.w3c.org/1999/xlink">
<homepage xlink:type="simple"
xlink:href="http://www.w3schools.com">Visit w3schools</homepage>
</Homepages>



//XLS FILE
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html" version="1.0" encoding="UTF-8" indent="yes"/>
<xsl:template match="/">
<html>
<head>
<title></title>
</head>
<body>
<h1>
<xsl:value-of select="." />
</h1>
</body>
</html>
</xsl:template>
</xsl:stylesheet>



and here's the new output
http://i35.tinypic.com/1hzpf.png

it didn't produce a link ..what should i do now ?

Alex Vincent
11-23-2008, 04:00 PM
Well, the initial error was about no style sheets. So give it a CSS style sheet instead of a XSLT one. For instance, are your homepage elements supposed to be display: inline or display: block? What font styling for your link?



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum