Hi Replying to myself:
> I think another example will clarify my point. The code: > > simpleXmlOne, simpleXmlTwo :: String > simpleXmlOne = "<a:Foo xmlns:a=\"http://foo.org\"/>" > simpleXmlTwo = "<b:Foo xmlns:b=\"http://foo.org\"/>" > > nsEnv :: [(String, String)] > nsEnv = [ ("notFoo" , "http://notfoo.org") ] > > evalXPath :: String -> [XmlTree] > evalXPath xml = > runLA ( xread > >>> propagateNamespaces > >>> getXPathTreesWithNsEnv nsEnv "//a:Foo" > ) xml > > Now notice that simpleXmlOne and simpleXmlTwo are equivalent. Yes, they > have a different prefix for "http://foo.org", but the documents means > the same. And as you write yourself, "... the prefix is no longer > releavant ..." Yet: > > evalXPath simpleXmlOne /= evalXPath simpleXmlTwo > Just to clarify things. The point I am making is that: getXPathTreesWithNsEnv nsEnv "//a:Foo" do not only see the prefixes in 'nsEnv', but also the prefixes in the XML it is applied to. I think that the getXPathTreesWithNsEnv function should only see the prefixes mentioned in its first parameter. Regards, Mads
signature.asc
Description: This is a digitally signed message part
_______________________________________________ Haskell-Cafe mailing list [email protected] http://www.haskell.org/mailman/listinfo/haskell-cafe
