[Mono-dev] XPath and Mono
Miguel de Icaza
miguel at xamarin.com
Mon Mar 5 17:45:19 UTC 2012
Hey guys,
The current XPath stack on Mono is tied up to 1.0 because this is what
.NET had.
Every once in a while we run into useful features from XPath 2.0 that
would be useful to have. And although a complete XPath implementation is
not something that we want to jump into with both feet, it would be useful
to introduce some of the simpler new functions that were part of XPath 2.0,
like the convenience "ends-with" method instead of the alternative mess:
substring(/myXml/data,
string-length(/myXml/data) - string-length('World') +1
)
Or:
<stylesheet> or <transform> : <msxsl:script language="C#"
implements-prefix="x"
xmlns:msxsl="urn:schemas-microsoft-com:xslt">public bool ends_with
(string s, string target) { return s.EndsWith (target);
}</msxsl:script>
and use "x:ends_with(foo, bar)" instead
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ximian.com/pipermail/mono-devel-list/attachments/20120305/129c7052/attachment.html>
More information about the Mono-devel-list
mailing list