Go Back   CodingForums.com > :: Client side development > XML

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 11-23-2008, 03:39 AM   PM User | #1
capt_nemo777
New Coder

 
Join Date: Jul 2008
Posts: 63
Thanks: 12
Thanked 0 Times in 0 Posts
capt_nemo777 is an unknown quantity at this point
Question xlink help

i have this simple xml code and i placed some xlink stuff
Code:
<?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



because of this, i created an xslt file to accompany the output
Code:
//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>
Code:
//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


it didn't produce a link ..what should i do now ?
capt_nemo777 is offline   Reply With Quote
Old 11-23-2008, 04:00 PM   PM User | #2
Alex Vincent
Moderator


 
Join Date: May 2002
Location: Hayward, CA
Posts: 1,427
Thanks: 1
Thanked 19 Times in 17 Posts
Alex Vincent is on a distinguished road
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?
__________________
"The first step to confirming there is a bug in someone else's work is confirming there are no bugs in your own."
June 30, 2001
author, Verbosio prototype XML Editor
author, JavaScript Developer's Dictionary
https://alexvincent.us/blog
Alex Vincent is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 11:03 PM.


Advertisement
Log in to turn off these ads.