472,780 Members | 1,397 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,780 software developers and data experts.

HTML Hyperlink into an XML page?

Hi all,
I there any way of putting an html hyperlink into a .xml file, and still be
able to use the xml tags to format the page? Here is the code of the xml
file(real simple) and the .css file. I would like to use the .css as the
style sheet if possible.

Thanks,
Kelsey

<?xml version="1.0" encoding="iso-8859-1"?>
<?xml-stylesheet type="text/css" href="phone_catalog.css"?>
<requirement>
<page>index.htm</page>
<page>contact.htm</page>
<page>information.htm</page> <--like to put the hyperlinks here.
<page>NewPromo.htm</page>
</requirement>
CSS Below

requirement
{
background-color: #ffffff;
width: 100%;
color: red;
}

page
{
display: block;
margin-bottom: 3pt;
margin-left: 0;
}
element
{
color: #FF0000;
font-size: 20pt;
}
price
{
color: #0000FF;
font-size: 20pt;
}
Jul 20 '05 #1
1 3430
Randi wrote:
Hi all,
I there any way of putting an html hyperlink into a .xml file, and still be
able to use the xml tags to format the page? Here is the code of the xml
file(real simple) and the .css file. I would like to use the .css as the
style sheet if possible.

Thanks,
Kelsey

<?xml version="1.0" encoding="iso-8859-1"?>
<?xml-stylesheet type="text/css" href="phone_catalog.css"?>
<requirement>
<page>index.htm</page>
<page>contact.htm</page>
<page>information.htm</page> <--like to put the hyperlinks here.
<page>NewPromo.htm</page>
</requirement>


With Mozilla and Opera you should be able to use an XHTML link e.g.
<html:a xmlns:html="http://www.w3.org/1999/xhtml"
href="...">...</html:a>
as in

<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/css" href="test20040507.css"?>
<requirement xmlns:html="http://www.w3.org/1999/xhtml">
<page><html:a href="index.htm">index</html:a></page>
<page><html:a href="contact.htm">contact</html:a></page>
<page><html:a href="information.htm">information</html:a></page>
<page><html:a href="NewPromo.htm">promotion</html:a></page>
</requirement>

Or with Mozilla you should be able use simple XLinks.

But in general you are better off with using XSLT to transform your XML
data to HTML and then serve that to the browsers.
--

Martin Honnen
http://JavaScript.FAQTs.com/
Jul 20 '05 #2

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

Similar topics

1
by: Matt | last post by:
For example, how to represent hyperlink in XSL? I want to add hyperlink in XSL. i.e. I need to generate <A HREF="http://mypage.html">home page</A> in HTML. I tried the following approaches but...
0
by: lbailor | last post by:
Hi, I am very new to xml and I'm trying to display a page that pulls fields from my xml file and displays them in a table in an html page. So far this part is working. However, I want my one field...
6
by: Paolo Pignatelli | last post by:
I have an aspx code behind page that goes something like this in the HTML view: <asp:HyperLink id=HyperLink1 runat="server" NavigateUrl='<%#"mailto:" &amp;...
19
by: Joe | last post by:
I have an aspx page (referred to here as page_1) with a datagrid whose first column contains hyperlinks. When a user clicks one of these hyperlinks, he will navigate to another aspx page (referred...
1
by: Agnes | last post by:
I got a grid list the record, column1 is "number" When the user press colunn 1 , i want to show out the pdf file whose filename is same as column1's contents How can I do that ?? thanks a lot <a...
1
by: czi02 | last post by:
hi there is there anybody knows how to hyperling a page1 to another page?. For example ive hyerlink my name cziarel then I wanted it to show my pictures once i had hyperlink my me cziarel. ANd...
41
by: deko | last post by:
A web page can be created using either strict or transitional HTML. The DOCTYPE for strict is: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> And...
17
by: =?Utf-8?B?Y2F0aGFyaW51cyB2YW4gZGVyIHdlcmY=?= | last post by:
Hello, I have build a website with approximately 30 html-pages. When I search this website in Google, I see the index.html or home.html on this website, but also other html-pages on this...
20
by: tshad | last post by:
I had posted this problem earlier and just noticed that the Hyperlink is the problem. Apparently, it doesn't figure out the path correctly. It uses the path of the file it is in, even if it is...
0
by: erikbower65 | last post by:
Using CodiumAI's pr-agent is simple and powerful. Follow these steps: 1. Install CodiumAI CLI: Ensure Node.js is installed, then run 'npm install -g codiumai' in the terminal. 2. Connect to...
0
linyimin
by: linyimin | last post by:
Spring Startup Analyzer generates an interactive Spring application startup report that lets you understand what contributes to the application startup time and helps to optimize it. Support for...
0
by: erikbower65 | last post by:
Here's a concise step-by-step guide for manually installing IntelliJ IDEA: 1. Download: Visit the official JetBrains website and download the IntelliJ IDEA Community or Ultimate edition based on...
0
by: Taofi | last post by:
I try to insert a new record but the error message says the number of query names and destination fields are not the same This are my field names ID, Budgeted, Actual, Status and Differences ...
0
by: Rina0 | last post by:
I am looking for a Python code to find the longest common subsequence of two strings. I found this blog post that describes the length of longest common subsequence problem and provides a solution in...
5
by: DJRhino | last post by:
Private Sub CboDrawingID_BeforeUpdate(Cancel As Integer) If = 310029923 Or 310030138 Or 310030152 Or 310030346 Or 310030348 Or _ 310030356 Or 310030359 Or 310030362 Or...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
0
by: lllomh | last post by:
How does React native implement an English player?
0
by: Mushico | last post by:
How to calculate date of retirement from date of birth

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.