xml linking

M

Mike

I need to have some links within an xml document to external pages. I
have tried with the below xml and xsl documents(the proposed link has
a tag called link under paragraph):

XML:
----------------------------
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="rates.xsl"?>
<rates>
<pagetitle>Rates 2003/2004</pagetitle>
<group>
<content>
<paragraph>
These rates do not contain cleaning/maintenance fees
($100) or the 11.5% Florida Sales Tax.
</paragraph>
<paragraph>
Minimum Rental (3)Nights.
</paragraph>
<paragraph>
No Pets/No Smoking Allowed.
</paragraph>
<paragraph>
Rates subject to
<link
xmlns:xlink="http://www.w3.org/1999/xlink"
xlink:type="simple"
xlink:href="http://www.cnn.com">
change
</link>
without notification.
</paragraph> <paragraph>
Security deposit of $200 is required to hold
reservation &amp; is returned within 2 weeks
of departure.
</paragraph>
</content>
<ratetable>
<tableheaderseason>Season</tableheaderseason>
<tableheaderdaily>Daily</tableheaderdaily>
<tableheaderweekly>Weekly(Sat-Sat)</tableheaderweekly>
<tableheadermonthly>Monthly</tableheadermonthly>
<seasonalrows>
<rowseason>Fall</rowseason>
<rowdates>9/6 - 10/24/03</rowdates>
<rowdaily>$159</rowdaily>
<rowweekly>$963</rowweekly>
<rowmonthly>Inquire</rowmonthly>
</seasonalrows>
<seasonalrows>
<rowseason>Winter</rowseason>
<rowdates>10/25 - 2/28/04</rowdates>
<rowdaily>$129</rowdaily>
<rowweekly>$783</rowweekly>
<rowmonthly>Inquire</rowmonthly>
</seasonalrows>
</ratetable>
</group>
</rates>


XSL:
--------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:template match="/">
<html>
<head>
<title><xsl:value-of select="rates/pagetitle" /> -
kscarrollproperties.com</title>
<meta http-equiv="content-type" content="text/html;
charset=iso-8859-1" />
<meta content="MSHTML 6.00.2800.1226" name="GENERATOR" />
<link media="all" href="global.css" type="text/css" rel="stylesheet"
/>
<style type="text/css" media="all">@import url(global_p.css);</style>
<script language="javascript"><!--
function show(object) {
if (document.getElementById) {
document.getElementById(object).style.visibility = 'visible';
}
else if (document.layers && document.layers[object]) {
document.layers[object].visibility = 'visible';
}
else if (document.all) {
document.all[object].style.visibility = 'visible';
}
}

function hide(object) {
if (document.getElementById) {
document.getElementById(object).style.visibility = 'hidden';
}
else if (document.layers && document.layers[object]) {
document.layers[object].visibility = 'hidden';
}
else if (document.all) {
document.all[object].style.visibility = 'hidden';
}
}
//-->
</script>
</head>
<body>
<div id="setwidth">
<div id="right2column">
<div id="left"></div>
<div class="leftsiderates">
<h1><xsl:value-of select="rates/pagetitle" /></h1>
<xsl:for-each select="rates/group/content/paragraph">
<p><xsl:value-of select="." /></p>
</xsl:for-each>
</div>
<div class="rightsiderates">
<table border="0" cellspacing="1" cellpadding="4">
<tr>
<td class="rowHead"><xsl:value-of
select="rates/group/ratetable/tableheaderseason" /></td>
<td class="rowHead"><xsl:value-of
select="rates/group/ratetable/tableheaderdaily" /></td>
<td class="rowHead"><xsl:value-of
select="rates/group/ratetable/tableheaderweekly" /></td>
<td class="rowHead"><xsl:value-of
select="rates/group/ratetable/tableheadermonthly" /></td>
</tr>
<tr>
<td colspan="4" class="rowSubHead">View <a
href="#">availability</a> or <a href="contact.htm">contact us</a> to
reserve your dates.</td>
</tr>
<xsl:for-each select="rates/group/ratetable/seasonalrows">
<tr>
<td class="row1"><span class="dkbluetext"><xsl:value-of
select="rowseason" /></span></td>
<td class="row1r"><xsl:value-of select="rowdaily" /></td>
<td class="row1r"><xsl:value-of select="rowweekly" /></td>
<td class="row1"><a href="contact.htm"><xsl:value-of
select="rowmonthly" /></a></td>
</tr>
</xsl:for-each>
</table>
</div>
<br clear="all" /><br clear="all" />
</div>
</div>
</body>
</html>
</xsl:template>
</xsl:stylesheet>


I appreciate any help
 
M

Mike

sorry, I posted this here in error, I've created it's own posting now.

Sorry

I need to have some links within an xml document to external pages. I
have tried with the below xml and xsl documents(the proposed link has
a tag called link under paragraph):

XML:
----------------------------
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="rates.xsl"?>
<rates>
<pagetitle>Rates 2003/2004</pagetitle>
<group>
<content>
<paragraph>
These rates do not contain cleaning/maintenance fees
($100) or the 11.5% Florida Sales Tax.
</paragraph>
<paragraph>
Minimum Rental (3)Nights.
</paragraph>
<paragraph>
No Pets/No Smoking Allowed.
</paragraph>
<paragraph>
Rates subject to
<link
xmlns:xlink="http://www.w3.org/1999/xlink"
xlink:type="simple"
xlink:href="http://www.cnn.com">
change
</link>
without notification.
</paragraph> <paragraph>
Security deposit of $200 is required to hold
reservation &amp; is returned within 2 weeks
of departure.
</paragraph>
</content>
<ratetable>
<tableheaderseason>Season</tableheaderseason>
<tableheaderdaily>Daily</tableheaderdaily>
<tableheaderweekly>Weekly(Sat-Sat)</tableheaderweekly>
<tableheadermonthly>Monthly</tableheadermonthly>
<seasonalrows>
<rowseason>Fall</rowseason>
<rowdates>9/6 - 10/24/03</rowdates>
<rowdaily>$159</rowdaily>
<rowweekly>$963</rowweekly>
<rowmonthly>Inquire</rowmonthly>
</seasonalrows>
<seasonalrows>
<rowseason>Winter</rowseason>
<rowdates>10/25 - 2/28/04</rowdates>
<rowdaily>$129</rowdaily>
<rowweekly>$783</rowweekly>
<rowmonthly>Inquire</rowmonthly>
</seasonalrows>
</ratetable>
</group>
</rates>


XSL:
--------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:template match="/">
<html>
<head>
<title><xsl:value-of select="rates/pagetitle" /> -
kscarrollproperties.com</title>
<meta http-equiv="content-type" content="text/html;
charset=iso-8859-1" />
<meta content="MSHTML 6.00.2800.1226" name="GENERATOR" />
<link media="all" href="global.css" type="text/css" rel="stylesheet"
/>
<style type="text/css" media="all">@import url(global_p.css);</style>
<script language="javascript"><!--
function show(object) {
if (document.getElementById) {
document.getElementById(object).style.visibility = 'visible';
}
else if (document.layers && document.layers[object]) {
document.layers[object].visibility = 'visible';
}
else if (document.all) {
document.all[object].style.visibility = 'visible';
}
}

function hide(object) {
if (document.getElementById) {
document.getElementById(object).style.visibility = 'hidden';
}
else if (document.layers && document.layers[object]) {
document.layers[object].visibility = 'hidden';
}
else if (document.all) {
document.all[object].style.visibility = 'hidden';
}
}
//-->
</script>
</head>
<body>
<div id="setwidth">
<div id="right2column">
<div id="left"></div>
<div class="leftsiderates">
<h1><xsl:value-of select="rates/pagetitle" /></h1>
<xsl:for-each select="rates/group/content/paragraph">
<p><xsl:value-of select="." /></p>
</xsl:for-each>
</div>
<div class="rightsiderates">
<table border="0" cellspacing="1" cellpadding="4">
<tr>
<td class="rowHead"><xsl:value-of
select="rates/group/ratetable/tableheaderseason" /></td>
<td class="rowHead"><xsl:value-of
select="rates/group/ratetable/tableheaderdaily" /></td>
<td class="rowHead"><xsl:value-of
select="rates/group/ratetable/tableheaderweekly" /></td>
<td class="rowHead"><xsl:value-of
select="rates/group/ratetable/tableheadermonthly" /></td>
</tr>
<tr>
<td colspan="4" class="rowSubHead">View <a
href="#">availability</a> or <a href="contact.htm">contact us</a> to
reserve your dates.</td>
</tr>
<xsl:for-each select="rates/group/ratetable/seasonalrows">
<tr>
<td class="row1"><span class="dkbluetext"><xsl:value-of
select="rowseason" /></span></td>
<td class="row1r"><xsl:value-of select="rowdaily" /></td>
<td class="row1r"><xsl:value-of select="rowweekly" /></td>
<td class="row1"><a href="contact.htm"><xsl:value-of
select="rowmonthly" /></a></td>
</tr>
</xsl:for-each>
</table>
</div>
<br clear="all" /><br clear="all" />
</div>
</div>
</body>
</html>
</xsl:template>
</xsl:stylesheet>


I appreciate any help
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,535
Members
45,007
Latest member
obedient dusk

Latest Threads

Top