Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > xml linking

Reply
Thread Tools

xml linking

 
 
Mike
Guest
Posts: n/a
 
      09-23-2003
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
xmlnslink="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"
xmlnssl="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
 
Reply With Quote
 
 
 
 
Mike
Guest
Posts: n/a
 
      09-24-2003
sorry, I posted this here in error, I've created it's own posting now.

Sorry

http://www.velocityreviews.com/forums/(E-Mail Removed) (Mike) wrote in message news:<(E-Mail Removed) 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
> xmlnslink="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"
> xmlnssl="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

 
Reply With Quote
 
 
 
Reply

Thread Tools

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
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Linking with xml content Sneamia XML 2 06-02-2006 11:07 PM
Different results parsing a XML file with XML::Simple (XML::Sax vs. XML::Parser) Erik Wasser Perl Misc 5 03-05-2006 10:09 PM
linking xml document to xsl stylesheet in C UndoMiel XML 1 09-21-2004 09:06 PM
linking XML docs perturbed XML 1 10-16-2003 03:52 PM
xml and linking help please Mike XML 0 09-24-2003 02:05 PM



Advertisments