I generated an xml file. I have an xslt to sort the xml file and look for certain words.
The user should be able to view the page and click on the url to a specific 'article' that the xml sheet generated. I want this url to call a separate .php page that is automatically generated from the values of the xml document. Is this possible? How do I do that?
Here is a sample of the xml doc:
<?xml version="1.0" encoding="iso-8859-1"?>
<?DOCTYPE archive
[
<!ELEMENT archive(release)>
<!ELEMENT release (year, date, headline, body, url)>
<!ELEMENT year (#PCDATA)>
<!ELEMENT date (#PCDATA)>
<!ELEMENT headline (#PCDATA)>
<!ELEMENT body (#PCDATA)>
<!ELEMENT url (#PCDATA)>
]?>
<?xml-stylesheet type="text/xsl" href="releases.xslt"?>
<archive>
<release>
<year>2005</year>
<date>August 20, 2005</date>
<headline>title goes here<headline>
<body>content</body>
<url>this calls the php page</url>
</release>
</archive>
Here is the xslt in case you need to view:
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method='html' indent='yes' doctype-public='-//W3C//DTD HTML 3.2 FINAL//EN'/>
<xsl:template match="/">
<html>
<head>
<title>2005</title>
<!--<link rel="stylesheet" href="style2.css" type="text/css" /> -->
</head>
<body>
<xsl:for-each select="archive/release">
<xsl:if test="year='2005'">
<span>
<xsl:value-of select="date"/>
<br/>
</span>
<span>
<xsl:value-of select="headline"/>
<br/>
</span>
<span>Read Article:
<a>
<xsl:attribute name="href">
<xsl:value-of select="url"/>
</xsl:attribute>
<xsl:attribute name="target">_blank</xsl:attribute>
<xsl:value-of select="url"/>
</a>
</span>
</xsl:if>
</xsl:for-each>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
THANK YOU!