Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" href="support.xsl"?>
<supportgroups>
<region name="Western" updated="12/07/04">
<city name="Holland">
<supportgroup>
<title>Holland District Library</title>
<date>Every 1st Thursday</date>
<time>7:00PM - 8:30PM</time>
<location>Address</location>
<notes></notes>
<facilitator>
<name>Facilitator One</name>
<phone>Phone One</phone>
</facilitator>
</supportgroup>
<supportgroup>
<title>Rest Haven Care Center</title>
<date>Every 2nd Tuesday</date>
<time>1:30PM</time>
<location>Address</location>
<notes></notes>
<facilitator>
<name>Facilitator One</name>
<phone>Phone One</phone>
</facilitator>
<facilitator>
<name>Facilitator Two</name>
<phone>Phone Two</phone>
</facilitator>
</supportgroup>
</city>
</region>
</supportgroups>
<?xml version="1.0" encoding="ISO_8859-1" ?>
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:template match="/">
<xsl:apply-templates select="supportgroups" />
</xsl:template>
<xsl:template match="supportgroups">
<html>
<body>
<xsl:apply-templates select="region" />
</body>
</html>
</xsl:template>
<xsl:template match="region">
<table border="0" width="95%" cellpadding="2" cellspacing="0">
<tr>
<td>
<div style="border: 1px solid #000000; padding: 0px; background: #FFFFFF; ">
<table>
<tr>
<td class="bodysubhead">
<xsl:value-of select="./@name" /> Area Support Groups (List Updated <xsl:value-of select="./@updated" />)
</td>
</tr>
</table>
<div style="padding: 3px;">
<p>
<xsl:apply-templates select="city" />
</p>
</div>
</div>
</td>
</tr>
</table>
</xsl:template>
<xsl:template match="city">
<table style="border:0;cellpadding:2;width:500px;cellspacing:0;">
<tr>
<td>
<div style="border:1px solid #000000; padding:0px; background:#F7F6D6;">
<table>
<tr>
<td class="bodysubhead">
<xsl:value-of select="./@name" />
</td>
</tr>
</table>
<p>
<ul>
<xsl:apply-templates select="supportgroup" />
</ul>
</p>
</div>
</td>
</tr>
</table>
</xsl:template>
<xsl:template match="supportgroup">
<li><b>
<xsl:value-of select="./title"/>
</b><br/>
<xsl:value-of select="./date"/> @ <xsl:value-of select="./time"/><br/>
<xsl:value-of select="./location"/> -- <xsl:value-of select="../@name"/><br/>
<xsl:if test="./notes !='">
<i><b><xsl:value-of select="./notes"/></b></i><br/>
</xsl:if>
Facilitator :
<xsl:apply-templates select="facilitator" />
</li>
</xsl:template>
<xsl:template match="facilitator">
<xsl:value-of select="./name" />, <xsl:value-of select="./phone" /><br />
</xsl:template>
</xsl:stylesheet>
<?
$xh = xslt_create(); //Creates an XSLT transform object
$myResult = xslt_process(
$xh,
'support.xml',
'support.xsl'
);
echo $myResult; //Sends the to the browser the transformed XML into HTML appearance.
xslt_free($xh); // Free's the object from memory.
?>
<?
// Xml and XSL files
$xml_file = "complex.xml";
$xsl_file = "complex.xsl";
// Allocate a new XSLT processor
$xh = xslt_create();
$fileBase = 'file://' . getcwd () . '/';
xslt_set_base ( $xh, $fileBase );
// Process the document
$result = xslt_process($xh, $xml_file, $xsl_file);
if (!$result) {
// Something croaked. Show the error
echo 'XSLT processing error: ' .xslt_error($xh) ;
}
else {
// Output the resulting HTML
echo $result;
}
// Destroy the XSLT processor
xslt_free($xh);
?>