There are (far too) many sources for XML technologies on the web. Here are a few that I found useful.
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:fn="http://www.w3.org/2005/02/xpath-functions" xmlns:xdt="http://www.w3.org/2005/02/xpath-datatypes"> ... </xsl:stylesheet>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0"
xmlns="http://www.w3.org/1999/xhtml"
xmlns:fn="MyFunctions"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsl:output method="xhtml" indent="yes"
doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN"/>
<xsl:template match="/">
<html>
<head>
<meta http-equiv='content-type' content='text/html;charset=UTF-8'/>
<title>the title</title>
</head>
<body>
the content of the body in xhtml
</body>
</html>
</xsl:template>
</xsl:stylesheet>
<xsl:variable name="fileName" select="replace(document-uri(/),'.*/(.*)','$1')"/>
xml in a given directory
<xsl:variable name="fileNames"
select="for $f in collection('file:///Absolute/path/to/directory?select=*.xml')
return document-uri($f)"/>
See this link for more information about dealing with information about files.
As usually a web site does not return a directory structure but a file containing the list of its files, the preceding XSLT instruction will not work with urls starting with http:. Here is a code snippet for parsing the file given at $url and matching each line containing $pattern.
<xsl:variable name="files">
<xsl:analyze-string select="unparsed-text($url)" regex="\r?\n">
<xsl:non-matching-substring>
<xsl:if test="matches(.,$pattern)">
... do something with this line ...
</xsl:if>
</xsl:non-matching-substring>
</xsl:analyze-string>
</xsl:variable>