linking problem

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • dawe

    #1

    linking problem

    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 ?
  • Bart Van der Donck

    #2
    Re: linking problem

    dawe wrote:
    [color=blue]
    > 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 ?[/color]

    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_styl e.css" type="text/css"?>
    <ROOT xmlns:html="htt p://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

    Comment

    Working...