XHTML XML XSL linking and <br/>

Discussion in 'Software' started by patriic48@gmail.com, Oct 22, 2012.

  1. patriic48@gmail.com

    patriic48@gmail.com

    Joined:
    Oct 13, 2012
    Messages:
    9
    Location:
    Middle Sweden
    Linking from XML to HTML
    My HTML page looks like this (index.html)_
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" lang="sv" xml:lang="sv">
    <head>
    <!-- This solution are made with XTML, HTML5, XML, // -->
    <title>XHTML to XML </title>
    </head>
    <body>
    <table>
    <tr>
    <td colspan="1"><h2>XHTML to XML with Structure & Core</h2></td>
    </tr>
    <tr>
    <td align="left">
    <p><a href="page1.xml"><b>This link goes to Page 1 with XML</b></a></p>
    <p><a href="page2.xml"><b>This link goes to Page 2 with XML</b></a></p>
    </td>
    </tr>
    </table>
    </body>
    </html>


    My XML looks like this(page1.xml), (seen it in the forum before):

    <?xml version="1.0" encoding="ISO-8859-1"?>
    <?xml-stylesheet type="text/xsl" href="links_xsl.xsl"?>
    <requirement xmlns:html="http://www.w3.org/1999/xhtml">
    <page><html:a href="index.html">index</html:a></page>
    <page><html:a href="contact.htm">contact</html:a></page>
    </requirement>

    This works but without <br/> which I want, if done without XSLT I would be happy, I thought maybe something like this with XSLT, will fix it, but not, please help, I´ve done it before but can´t remember how;

    (links_xsl.xsl) - document looks like this:

    <?xml version="1.0"?>
    <xsl:stylesheet version="1.0"
    xmlnssl="http://www.w3.org/1999/XSL/Transform">
    <xsl:template match="/">
    <HTML>
    <HEAD>
    </HEAD>
    <BODY>
    <table>
    <xsl:for-each select="page"”>
    <p>
    <xsl:value-of select="page"/>
    <xsl:apply-templates>
    </p>
    </xsl:for-each>
    </table>
    </BODY>
    </HTML>
    </xsl:template>
    </xsl:stylesheet>

    If I could skip the XSLT I´m glad, otherwise very happy, tips?

    Regards / patriic48
     
    patriic48@gmail.com, Oct 22, 2012
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. univbgp102@gmail.com
    Replies:
    1
    Views:
    426
    gnu / linux
    May 22, 2008
  2. univbgp102@gmail.com
    Replies:
    0
    Views:
    551
    univbgp102@gmail.com
    May 20, 2008
  3. Dhanabal
    Replies:
    0
    Views:
    398
    Dhanabal
    May 28, 2008
  4. Liam

    XML /// XSL in 305

    Liam, Feb 8, 2005, in forum: MCAD
    Replies:
    0
    Views:
    286
  5. Kamal

    XML/XSL Based Menu

    Kamal, May 13, 2005, in forum: MCAD
    Replies:
    0
    Views:
    340
    Kamal
    May 13, 2005
Loading...

Share This Page