Need help with Webpage -- Linux Distro List -- I figured it out!

lowtech1

Diamond Member
Mar 9, 2000
4,644
1
0
What is the equivalent to (a href="URL") Text to Activate Link (/a) in HTML?

And, what is the simplest way to create a link in XML?

Thanks


[Edit] Please see link & tell me what you think. Post your comment here of pm me if you find any incorrect or missing information.


Linux Distro List
 

MaxDepth

Diamond Member
Jun 12, 2001
8,757
43
91
how do you intend to use XML? through a browser? .NET environment?


the easiest way for an XML browser is to call a CSS designed A link.
 

lowtech1

Diamond Member
Mar 9, 2000
4,644
1
0
Originally posted by: MaxDepth
how do you intend to use XML? through a browser? .NET environment?


the easiest way for an XML browser is to call a CSS designed A link.
I don't know anything regard .NET, but like to learn how to create webpage using XML/XSL. Then the next step is JSP to create webpage from existing live SQL data.


 

lowtech1

Diamond Member
Mar 9, 2000
4,644
1
0

There must be an easy way to create hyper links in xml/xsl than create a style sheet using somekind of scripting language.
 

lowtech1

Diamond Member
Mar 9, 2000
4,644
1
0
Originally posted by: MaxDepth
some study references:

XML study link #1
Thanks for the link, but I know enought about XML to get me going. What I like to know is how to create XLINK "simple" (hyper link) or the alike in embeded XML island & XSL/CSS style sheet.
 

Ameesh

Lifer
Apr 3, 2001
23,686
1
0
your XSLT will have to have a template for a specific tag ion your xml to transform it to an anchor, XML is purely data so there is no concept of a link in plain xml.
 

lowtech1

Diamond Member
Mar 9, 2000
4,644
1
0
Originally posted by: Ameesh
your XSLT will have to have a template for a specific tag ion your xml to transform it to an anchor, XML is purely data so there is no concept of a link in plain xml.
That is what I have done, but I haven't figure out how to create hyper link similar to html (a href) tag.

<!--

***** Below is the distro_list.xml file *****

<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" href="distro_list.xsl"?>
<distro_list>
<distro>
<name>2-Disk Xwindow</name>
<developer>Mungkie Associates Inc.</developer>
<language>En</language>
<cpu>x86</cpu>
<url>http://www.thepub.nildram.co.uk/mirrors/2diskxwin/2diskXwin.htm</url>
</distro>
<distro>
<name>Alphalinux</name>
<language>En, It</language>
<cpu>x86</cpu>
<url>http://alfalinux.sourceforge.net/alfaeng.php3</url>
</distro>
</distro_list>


***** Below is the style file distro_list.xsl *****

<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<html>
<body>
<center><h2>Linux Distro List</h2></center>
<table border="1" cellpadding="3" cellspacing="1" bgcolor="#eeeeee">
<tr align="center">
<th>#</th>
<th>Distribution</th>
<th>Developer</th>
<th>Flatform</th>
<th>Language</th>
<th>Link</th>
</tr>
<xsl:for-each select="distro_list/distro">
<xsl:sort select="name"/>
<tr bgcolor="#ffffff">
<td><xsl:number/>.</td>
<td><xsl:value-of select="name"/></td>
<td><xsl:value-of select="developer"/></td>
<td align="center"><xsl:value-of select="language"/></td>
<td align="center"><xsl:value-of select="cpu"/></td>
<td><xsl:value-of select="url"/></td>
</tr>
</xsl:for-each>
</table>
</body>
</html>
</xsl:template>
</xsl:stylesheet>

//-->

 

lowtech1

Diamond Member
Mar 9, 2000
4,644
1
0
Originally posted by: yakko
How about this?
Distrowatch.com is an excelent site, but replicating it is not my intention. It have alot of information including package tracking with a mixed bag of regular HTML & PHP.

As for my project is mainly an education excercise, that some might find useful. And, the information in xml format can be easily extract & reuse by others.

There must be someone here that know XML/XSLT/XLINK that could anwers my question regarding creating hyper-link that was asked in the top post.

PS. A good 20% of the distros on my list is learned from Distrowatch. And, as you can see that Distrowatch only list 125 of the Linux distro that is available. While my list comprise of a total of 230 distros, which is far from a compleate list of all distros that exist.
 

lowtech1

Diamond Member
Mar 9, 2000
4,644
1
0

I figured out why it didn't work. XML doesn't supported embeded link inside its structure when call upon by XSLT, However XLINK can be use inside XSL/XSLT file in "simple" or "extended" form.

<!--

XLINK example need to be save under .xsl file extension: <a xml:link="simple" href="http://members.shaw.ca/qtrinh/distro_list.xml">Linux Disktro List</a>

HTML example link that save under .htm file extension & can be embeded inside table & call upon by a style sheet: <a href="http://members.shaw.ca/qtrinh/distro_list.xml">Linux Disktro List</a>

//-->