Hi Mukul,

You mention:

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, 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"/>

So in my opinion the XPath library currently bundled with Xerces is not fully compliant to the W3C XPath 2.0 spec. And if it will not be updated, the Xerces XML Schema 1.1 validation will never be 100% compliant with the XML Schema 1.1 specification.

Regards,
Radu

Radu Coravu
<oXygen/>  XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com

On 2/1/2014 3:41 AM, Mukul Gandhi wrote:
The current XPath library on xerces SVN is fully compliant to W3C XPath
2.0 spec. I agree that, newer XPath 2.0 library on Eclipse SE project is
better in terms of API support for consuming applications. I think,new
psychopath XPath 2.0 APIs is not critical requirements for us just now.
Non xerces adopters of psychopath XPath engine would be better adopters
of newer psychopath XPath 2.0 APIs.

Regards,
Mukul

On Jan 31, 2014 8:12 PM, "Radu Coravu" <[email protected]
<mailto:[email protected]>> wrote:

    Hi,

    About this remark:

        After which we've to test against W3C XSD 1.1 test suite, and
        perhaps also against a tiny Xerces XSD 1.1 unit test suite.


    I thought you had automated tests for this. It seems to me that it's
    more damaging to use an older library which does not properly cover
    the XPath specification completely then to update to a new version.

    Regards,
    Radu

    Radu Coravu
    <oXygen/>  XML Editor, Schema Editor and XSLT Editor/Debugger
    http://www.oxygenxml.com

    On 1/31/2014 3:14 AM, Mukul Gandhi wrote:

        I'm moving this discussion, to Xerces devs forum. I've analyzed this
        issue a bit, and following are what I think currently,

        Moving to the new psychopath XPath 2.0 jar file as has been
        posted in
        the jira issue, would require changes to Xerces's source code at
        various
        places. After which we've to test against W3C XSD 1.1 test
        suite, and
        perhaps also against a tiny Xerces XSD 1.1 unit test suite. This
        seems
        to be lot of work.

        There's another idea I've currently. We can modify Xerces's
        source code,
        to simultaneously be able to use both an earlier jar file
        (currently on
        SVN) and the new one posted in the current jira thread (or something
        like this, therefore the current compilation of Xerces XSD 1.1
        doesn't
        invalidate). I think, this would be good modularity and would
        serve us
        well in the long run.

        Doing all of this, is significant work I think. I'm not in a
        position to
        make such changes to Xerces's source code currently :(

        But overall, I support the idea suggested in this jira issue.


        On Tue, Jan 28, 2014 at 12:13 PM, Radu Coravu (JIRA)
        <[email protected]
        <mailto:[email protected]>
        <mailto:xerces-j-dev@xml.__apache.org
        <mailto:[email protected]>>> wrote:


                  [
        
https://issues.apache.org/__jira/browse/XERCESJ-1623?page=__com.atlassian.jira.plugin.__system.issuetabpanels:comment-__tabpanel&focusedCommentId=__13883817#comment-13883817
        
<https://issues.apache.org/jira/browse/XERCESJ-1623?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13883817#comment-13883817>
             ]

             Radu Coravu commented on XERCESJ-1623:
             ------------------------------__--------

             I went here:

        http://download.eclipse.org/__webtools/downloads/
        <http://download.eclipse.org/webtools/downloads/>

             clicked the "3.5.1" link to the Web Tools Platform Project
        and in
             the other page I went to the "Traditional Zip Files"
        section and
             downloaded a large ZIP archive which also contains the
             "org.eclipse.wst.xml.xpath2.__processor_*.jar" JAR.

              > Invalid characters in assertion XPath expression
              > ------------------------------__------------------
              >
              >                 Key: XERCESJ-1623
              >                 URL:
        https://issues.apache.org/__jira/browse/XERCESJ-1623
        <https://issues.apache.org/jira/browse/XERCESJ-1623>
              >             Project: Xerces2-J
              >          Issue Type: Bug
              >          Components: XML Schema 1.1 Structures
              >    Affects Versions: 2.11.0
              >            Reporter: Octavian Nadolu
              >         Attachments:

        org.eclipse.wst.xml.xpath2.__processor_2.1.2.v201212060048.__jar
              >
              >
              > If I validate the following XML Schema, I get an error:
              > "cvc-xpath.3.13.4.2a: XPST0003 - Assertion XPath expression
             ('count(le:Einführung) le 1') on the schema type 'defKapitel'
             couldn't compile successfully."
              > I tested on the xml-schema-1.1-dev branch.
              > The error occurs because of the "ü" character that is
        used in the
             assertion. The problem seems to be the in the PsychoPath
        library
             (org.eclipse.wst.xml.xpath2.__processor_1.2.0.jar) that
        Xerces uses.
              > I updated the PsychoPath library to the latest version,
        2.1.2,
             and the validation seems to work well.
              > In order to make Xerces work with the new PsychoPath
        library, you
             need to make two modifications:
              > -  in XSAssertionXPath2ValueImpl.__java, you need to use
             PsychoPathTypeHelper instead of PsychoPathXPathTypeHelper.
              > - in AbstractPsychoPathXPath2Impl, the constructors of
             DefaultEvaluator and ElementType are modified.
              > ------ XML Schema --------------------
              > <?xml version="1.0" encoding="UTF-8"?>
              > <xs:schema xmlns:xs="http://www.w3.org/__2001/XMLSchema
        <http://www.w3.org/2001/XMLSchema>"
             elementFormDefault="qualified"
              >     xmlns:le="myns" targetNamespace="myns"
              >
        xmlns:vc="http://www.w3.org/__2007/XMLSchema-versioning
        <http://www.w3.org/2007/XMLSchema-versioning>"
             vc:minVersion="1.1">
              >     <xs:element name="Einführung"/>
              >     <xs:element name="Lernziele"/>
              >     <xs:element name="Textebene-1"/>
              >     <xs:complexType name="defKapitel">
              >         <xs:sequence>
              >             <xs:choice minOccurs="0" maxOccurs="2">
              >                 <xs:element ref="le:Einführung"/>
              >                 <xs:element ref="le:Lernziele"/>
              >             </xs:choice>
              >             <xs:element minOccurs="1" maxOccurs="unbounded"
             ref="le:Textebene-1"/>
              >         </xs:sequence>
              >         <xs:assert test="count(le:Einführung) le 1"/>
              >     </xs:complexType>
              > </xs:schema>
              > ------------------------------__--------------



             --
             This message was sent by Atlassian JIRA
             (v6.1.5#6160)




        Regards,
        Mukul Gandhi



    ------------------------------__------------------------------__---------
    To unsubscribe, e-mail: j-dev-unsubscribe@xerces.__apache.org
    <mailto:[email protected]>
    For additional commands, e-mail: [email protected]
    <mailto:[email protected]>




---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to