Hi Radu, Please see my comments inline, On Mon, Feb 3, 2014 at 6:58 PM, Radu Coravu <[email protected]> wrote:
> > The current XPath library on xerces SVN is fully compliant to W3C XPath >> 2.0 spec. >> > > The XPath 2.0 specification states that an XPath QName: > > http://www.w3.org/TR/xpath20/#prod-xpath-QName >> > > has a prefix and a local part which is of type NCName: > > http://www.w3.org/TR/REC-xml-names/#NT-NCName >> > > and the NCName needs to be composed of characters which obey the > specification: > > http://www.w3.org/TR/REC-xml/#NT-Char >> > > If the XPath parser included with the Xerces XML Schema 1.1 would be fully > compliant with the XPath 2.0 specs, it would be able to accept as valid > most of the unicode characters when used in NCNames I agree with you. I think, Xerces's XSD 1.1 engine currently supports an ASCII like character set for XML names and values of attributes. It probably supports certain unicode characters for XML names, but I'm not sure which ones (we need to check the implementation details again, within psychopath xpath 2.0 engine). but it has trouble even with simple characters like "ü" and it breaks when > validating assertions like: > > > <xs:assert test="count(le:Einführung) le 1"/> >> > I agree, an XPath 2.0 processor needs to support most of unicode characters. Implementing XPath 2.0 spec is quite overwhelming. But I think, Xerces has done a very good job, of implementing (actually, starting from adopting the original psychopath xpath 2.0 engine and then improving it) nearly every functional aspect of XPath 2.0. > > So in my opinion the XPath library currently bundled with Xerces is not > fully compliant to the W3C XPath 2.0 spec. I agree, its technically true. But we're very close to a near compliance, except for a wider unicode support as you've pointed. I'm not a personal expert on unicode implementation, but I find this area interesting. May be someone else can take this task in near term, for improving Xerces's XPath 2.0 unicode support. As has been discussed few times, on this forum why we can't quickly adopt the current Eclipse psychopath XPath 2.0 engine. Mainly because, of JDK level mismatches and also difference in spec functional compliance of XPath 2.0 engine on Xerces SVN and on Eclipse SE project. I think, there are few areas (like few F&O implementations) where XPath 2.0 engine on Xerces SVN complies better to the XPath 2.0 spec (that's my personal opinion). Regards, Mukul
