473,468 Members | 1,909 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

xml linking

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
Jul 20 '05 #1
1 1598
sorry, I posted this here in error, I've created it's own posting now.

Sorry

st**********@yahoo.com (Mike) wrote in message news:<22*************************@posting.google.c om>...
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

Jul 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Wolfgang | last post by:
I have a problem with linking my CPP Code under a irix6 machine (sgi, UNIX). In my CPP code I use some Functions which are written in Python. So its a kind of CPP wrapper for my Python functions In...
0
by: Dibyendu Roy | last post by:
Hi All, I build an object called "dblorcle" to connect to oracle database in Sun solaris box. This is built linking with various oracle ".a" (archived, for static linking) files come with standard...
7
by: Steven T. Hatton | last post by:
Is there anything that gives a good description of how source code is converted into a translation unit, then object code, and then linked. I'm particularly interested in understanding why putting...
2
by: sunil | last post by:
Hi, We have lot of c and fortran archive libraries that have complex dependencies. We have different server tasks that use some of these libraries. We have developed a tool inhouse that links...
20
by: Steven T. Hatton | last post by:
I just read this in the description of how C++ is supposed to be implemented: "All external object and function references are resolved. Library components are linked to satisfy external...
0
by: gasturbtec | last post by:
please help im new at access programming and i just got this project dropped in my lap because the old programmer quit. i've been doing ok so far but now i need to add code to an existing database...
6
by: Rudy Ray Moore | last post by:
I work with a multi-project workspace. One project (the "startup" project) has a "Configuration Type" of "Application (.exe)". The other 40 projects have a "Configuration Type" of "Static Library...
0
by: Rudy Ray Moore | last post by:
I've been having trouble getting incremental linking to work under Visual C++ .net 2003 7.1 for my multi-project workspace. Ronald Laeremans and Carl Daniel (and a few others) helped me figure it...
0
by: Philip Lowman | last post by:
I am in the process of trying to migrate a couple of build solutions to Visual Studio Express 2005 from VS 2003 Professional and I am running into a weird C/C++ runtime library linking issue when...
1
by: srikar | last post by:
what is the difference between static linking & dynamic linking, what are the advantages of each? How to perform static linking & Dynamic linking by using gcc -o liniking will be done , but...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.