I have written an xml, xsd and a xsl file, and I would like to know how to do the following:
If a user clicks on a certain link, the page displays a certain paragraph. If the user clicks on a different link, the page will display a different paragraph. How is this possible? Thank you.
EDIT:
This is the code. The idea is, if I click on the CountryName in question in the table, I display information about that country, if I click another, it'll show that one. The information will be in ws:CountryName/ws:Information and there will be text and pictures.
XSL:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:ws="http://www.w3schools.com"
version="1.0">
<xsl:template match="/">
<html>
<body>
<table border="1">
<tr bgcolor="red"><th>Country</th></tr>
<xsl:for-each select="ws:Categorie/ws:Countries/ws:Country">
<tr><td><xsl:value-of select="ws:CountryName"/></td></tr>
</xsl:for-each>
</table>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
There are pure JS implementations of XSLT which also support events, like Saxon-CE. Might want to give them a try. Actually, their own documentation is implemented using it, and does exactly what you're trying to achieve, so you may want to study that.
Sounds like you wish to have hide/show text linked to the respective countries. The best way to do that is to add links to the country values, which when clicked will run a javascript toggling the hide/show.
For instance:
When applied to the following input XML
This gives