Xerces-C++
  1. Xerces-C++
  2. XERCESC-1328

SAX2XMLReader::setFeature() handles feature use-cachedGrammarInParse incorrectly

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.6.0
    • Fix Version/s: None
    • Component/s: SAX/SAX2
    • Labels:
      None
    • Environment:
      RedHat Linux, kernel 2.4.20-18.9, xerces-c_2_6_0-redhat_80-gcc_32

      Description

      According to the documentation (SAX2 Programming Guide and Xerces-C++ Documentation), the setFeature() method of SAX2XMLReader is supposed to handle changes of the feature "http://apache.org/xml/features/validation/use-cachedGrammarInParse" as a no-op. Instead of doing so, it throws an exception, even if the feature is set to its current (valid) value.

      In my eyes, setFeature() should throw a SAXNotSupportedException only if the user tries to set the feature to a value different from its current value, and do nothing otherwise.

      If the implemented behavior is intended, the documentation should be updated accordingly.

      Stefan Letz.

        Activity

        Hide
        sletz added a comment -

        Fix verified.

        I suggest a change in the documentation of this feature, as the setting by the user is a no-op only when the cache-grammarFromParse feature is true. To make this clear, the two sentences in the note field could be combined using "and".

        Show
        sletz added a comment - Fix verified. I suggest a change in the documentation of this feature, as the setting by the user is a no-op only when the cache-grammarFromParse feature is true. To make this clear, the two sentences in the note field could be combined using "and".
        Hide
        cargilld added a comment -

        I just checked in a fix to correct the spelling of the string defined by XMLUni::fgXercesUseCachedGrammarInParse (the letter
        a was missing from Parse). Please verify.

        Show
        cargilld added a comment - I just checked in a fix to correct the spelling of the string defined by XMLUni::fgXercesUseCachedGrammarInParse (the letter a was missing from Parse). Please verify.
        Hide
        cargilld added a comment -

        The problem is that the predefined constant we used to check for this string has a typo in it... Will make a fix shortly.

        David

        Show
        cargilld added a comment - The problem is that the predefined constant we used to check for this string has a typo in it... Will make a fix shortly. David

          People

          • Assignee:
            Unassigned
            Reporter:
            sletz
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development