Hi all! I need to parse Visual Studio automatically generated XML documentation to create a report. I decided to use XSLT but I'm very new to it and need help. Common template is:
<doc>
<members>
<member name="F:MyNamespace">
<summary>Some text</summary>
</member>
</members>
</doc>
I want to isolate members with name which begins on some word, for example, P:Interfaces.Core. I decided to use RegExp in select statement.
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet
version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fn="http://www.w3.org/TR/xpath-functions/"
>
<xsl:template match="/" >
<html xmlns="http://www.w3.org/1999/xhtml">
<body style="font-family:Tahoma">
<p>Interfaces list:</p>
<table>
<xsl:for-each select="doc/members/member">
<xsl:sort order="ascending" />
<xsl:value-of select="fn:matches(., 'P\..+')" />
<br />
</xsl:for-each>
</table>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
Why does I'm getting error: Namespace [ttp://www.w3.org/TR/xpath-functions does not contain any functions > Where am I wrong? I found such code in examples, including w3c.org!