[erlang-bugs] [BUG] xmerl does not support contains(string, string) XPath function

Balint Reczey (IJ/ETH) Balint.Reczey@REDACTED
Tue Sep 25 13:42:18 CEST 2007


Hi,

The xmerl_xpath module summary says that it implements the whole XPath language, but it seems 
that the contains() string function ( http://www.w3.org/TR/xpath#function-contains ) is missing:

13> xmerl_xpath:string("//foo[contains(@bar, 'oe')]",element(1,xmerl_scan:string("<foo bar=\"Joe\" />"))).
** exited: {unknown_expr,
            {xmlObj,
             nodeset,
             [{xmlNode,
               attribute,
               {xmlAttribute,bar,[],[],[],[],1,[],"Joe",false},
               [{xmlNode,
                 element,
                 {xmlElement,
                  foo,
                  foo,
                  [],
                  {xmlNamespace,[],[]},
                  [],
                  1,
                  [{xmlAttribute,bar,[],[],[],[],...}],
                  [],
                  [],
                  "/export/localhome/lblircz",
                  undeclared},
                 [{xmlNode,
                   root_node,
                   {xmlDocument,
                    {xmlElement,
                     foo,
                     foo,
                     [],
                     {xmlNamespace,[],[]},
                     [],
                     1,
                     [...],...}},
                   [],
                   2}],
                 1},
                {xmlNode,
                 root_node,
                 {xmlDocument,
                  {xmlElement,
                   foo,
                   foo,
                   [],
                   {xmlNamespace,[],[]},
                   [],
                   1,
                   [{xmlAttribute,bar,[],...}],
                   [],
                   [],
                   "/home/erlanguser",
                   undeclared}},
                 [],
                 2}],
               1}]}} **
14> 



Regards,
Balint





More information about the erlang-bugs mailing list