[Mono-list] Re: [PATCH] running NAnt-0.6 on linux

ginga(A.E.) ginga@kit.hi-ho.ne.jp
Thu, 02 Jan 2003 02:39:28 +0900


Hello, (and happy new year!)

> XmlNode.SelectSingleNode( "@win32icon" ) fails with XML parser
> exception.

It was XPath parser's bug.

I tried a test below, and it failed at XPathParser.yyparseSafe().
--------
XmlDocument doc = new XmlDocument();
doc.LoadXml("<root attr='ATTR' attr1='ATTR1' />");
XmlNode n = doc.SelectSingleNode("@attr");	// correct
n = doc.DocumentElement.SelectSingleNode("@attr1"); // failure
--------

It is because Tokenizer.ParseIdentifier() parses 'attr1', as if
"attr1" had two separate tokens "attr" and "1".

I fixed Tokenizer.cs to allow digits as name characters. But it is
temporarily fix. It should also allow other characters
(e.g. unicode multibyte).


Thanks,

__ Atsushi Eno __