Uploaded image for project: 'Xerces2-J'
  1. Xerces2-J
  2. XERCESJ-1699

While using XSD 1.1, full XPath 2.0 with CTA doesn't work in certain cases

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.12.0
    • 2.12.1
    • None
    • Windows 10, 64-bit

    Description

      There are 2 scenarios:

      1. XSD file is specified inside the XML file via xsi:schemaLocation attribute.
        The "-fx" parameter is ignored. And it causes CTAs to fail to pick up the full XPath 2.0
      2. XSD file is specified via command line parameter "-a".
        The "-fx" parameter is taken into the account.
        CTAs pick up the full XPath 2.0

      Here my command line statement:

      C:\Program Files\Stylus Studio X16 XML Enterprise Suite 64-bit\bin>"c:\Program Files\Java\jre1.8.0_181\bin\java.exe" -Xms512m -Xmx1024m -Xbootclasspath/p:path:;c:\xerces212\xercesImpl.jar;c:\xerces212\xml-apis.jar;c:\xerces212\org.eclipse.wst.xml.xpath2.processor_1.2.0.jar;c:\xerces212\icu4j.jar;c:\xerces212\resolver.jar;c:\xerces212\serializer.jar;c:\xerces212\cupv10k-runtime.jar;c:\xerces212\xercesSamples.jar jaxp.SourceValidator -xsd11 -fx -i "file:///d:/Temp/Xerces-J 2.12.0/XercesJ_TZ20171231_IFRS15_CBCInput_3TZ005.xml"

      It doesn't recognize the "-fx" parameter, and therefore, the XSD validation is not picking up the full XPath 2.0 for the CTAs.
      It gives the following errors:

      • [Error]IFRS15_CBC_In_XercesJ.xsd:26:185: c-cta-xpath: The XPath expression '@OrganizationCode = ('1GT001', '1GT005', '1GT006', '1GT010', '1HN001', '1HN003', '1SV001', '2BO002', '2PY003', '2PY007')' couldn't compile successfully in 'cta-subset' mode, during CTA evaluation.
      • [Error]IFRS15_CBC_In_XercesJ.xsd:27:89: c-cta-xpath: The XPath expression '@OrganizationCode eq '2CO001'' couldn't compile successfully in 'cta-subset' mode, during CTA evaluation.
      • [Error]IFRS15_CBC_In_XercesJ.xsd:28:99: c-cta-xpath: The XPath expression '@OrganizationCode = ('2CO008', '2CO009')' couldn't compile successfully in 'cta-subset' mode, during CTA evaluation.
      • [Error]IFRS15_CBC_In_XercesJ.xsd:29:113: c-cta-xpath: The XPath expression '@OrganizationCode = ('3TZ001', '3TZ002', '3TZ003', '3TZ004')' couldn't compile successfully in 'cta-subset' mode, during CTA evaluation.

      Here my modified command line statement:

      C:\Program Files\Stylus Studio X16 XML Enterprise Suite 64-bit\bin>"c:\Program Files\Java\jre1.8.0_181\bin\java.exe" -cp .;c:\xerces212* jaxp.SourceValidator -xsd11 -fx -i "file:///d:\Temp\Xerces-J 2.12.0\XercesJ_TZ20171231_IFRS15_CBCInput_3TZ005.xml" -a "d:\Temp\Xerces-J 2.12.0\IFRS15_CBC_In_XercesJ.xsd"

      And errors are gone.

      Attachments

        1. XercesJ_TZ20171231_IFRS15_CBCInput_3TZ005.xml
          0.4 kB
          Yitzhak Khabinsky
        2. IFRS15_CBC_In_XercesJ.xsd
          7 kB
          Yitzhak Khabinsky

        Activity

          People

            mukul_gandhi Mukul Gandhi
            ykhabins Yitzhak Khabinsky
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: