This project is read-only.

Support of xpath-functions

Dec 11, 2014 at 10:41 AM
Great too see a new version after many years!
This version is built upon the 4.0 framework, but doens't support '' namespace while transforming XML.

Error Transforming XML
Cannot find a script or an extension object associated with namespace ''.

In the regular .NET 4.0 framework it does support this, so how come?

Dec 14, 2014 at 10:22 PM
I'm not aware of .NET 4.0 supporting those XPath 2.0 functions. Can you post a link to a sample stylesheet that uses these functions and the C# code that transforms it, then I will figure out how to include that in XML Notepad. Thanks.
Dec 15, 2014 at 8:39 AM
I cannot provide links to te code I use, but here's a snippet, in particular the fn namespace and function:

<?xml version='1.0' encoding='UTF-8'?>
<xsl:if test="fn:days-from-duration(fn:current-date() - xs:date(@dateChange)) = 0">

The C# code uses the Saxon compiler, which is why the transformation works. With the standard XSLT tranformation is doesn't.
Perhaps a good idea to use the Saxon compiler instead?
Dec 15, 2014 at 9:48 PM

Ok, you are using Saxon, so that makes sense. XML Notepad is not setup to use that compiler, but I could work on a “plugin” feature that allows you to plug in different XSLT engines… I’ll added a work item to the list of open issues, see:


Marked as answer by clovett on 4/25/2016 at 1:39 PM