linking problem

D

dawe

I am using a simple xml document with a CSS style sheet to create a
webpage but I am unable to create links to specific location on the
same webpage. For this purpose I am using Xpointers. Can somebody help
me with this ?
 
B

Bart Van der Donck

dawe said:
I am using a simple xml document with a CSS style sheet to create a
webpage but I am unable to create links to specific location on the
same webpage. For this purpose I am using Xpointers. Can somebody help
me with this ?

There are 2 ways to create hyperlinks in an XML document:
(1) Use namespaces, so you can inject HTML code inside your XML document
(2) Use XLink

The first is more intuitive if you're familiar with HTML.
This code is an example of (1) and should help you further:

-----------------------------

<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="your_style.css" type="text/css"?>
<ROOT xmlns:html="http://www.w3.org/TR/REC-html-4.0">
<mytag>This is XML</mytag>
<html:br/>
<html:a href="#bookmark">Link in HTML</html:a>
<html:br/>
<html:br/>
<html:br/>
<html:br/>
<html:br/>
<html:br/>
<html:br/>
<html:br/>
<html:br/>
<html:br/>
<html:br/>
<html:br/>
<html:br/>
<html:br/>
<html:br/>
<html:br/>
<html:br/>
<html:br/>
<html:br/>
<html:br/>
<html:br/>
<html:br/>
<html:br/>
<html:br/>
<html:a name="#bookmark">Bookmark goes here</html:a>
</ROOT>

-----------------------------

If you need more functionality than this example, you may find Xlink useful.
See: http://www.w3.org/TR/xlink/

Bart
 

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

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,022
Latest member
MaybelleMa

Latest Threads

Top