Uploaded image for project: 'Xerces-C++'
  1. Xerces-C++
  2. XERCESC-2106

Refactoring of CoreDocumentImpl

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • DOM
    • None

    Description

      Hello everyone.
      I was analyzing the modularization of some classes, and I identified that the class CoreDocumentImpl has an opportunity for cohesion improvement.
      The class SAXParser was in the same situation and the problem was solved as follows: The AbstractSAXParser class was created, and several get() and set() methods that were used only to configure the class parameters were moved from SAXParser to AbstractSAXParser.
      The new class was then accessed through an instance variable in SAXParser. This strategy has cleaned and improved SAXParser cohesion.
      With this in mind, I would recommend creating a new class: CoreDocumentImplConfig , and moving the following methods:

      setXmlVersion
      setVersion
      getNodeName
      getXmlStandalone
      getStrictErrorChecking
      setStrictErrorChecking
      getElementsByTagName
      getNodeListCache
      getNodeNumber
      setUserData
      getStandalone
      getAsync
      getTextContent
      setEncoding
      getUserData
      getDoctype
      getMutationEvents
      getOwnerDocument
      getVersion
      getDocumentURI
      getIdentifiers
      getElementById
      getEncoding
      setAttrNode
      getXmlVersion
      setInputEncoding
      getNodeType
      getErrorChecking
      setDocumentURI
      getXmlEncoding
      getBaseURI
      setStandalone
      setXmlEncoding
      getDocumentElement
      getInputEncoding
      getIdentifier
      setAsync
      getElementsByTagNameNS
      setXmlStandalone
      setMutationEvents
      getImplementation
      getDomConfig
      setTextContent
      getUserDataRecord
      setUserDataTable
      setErrorChecking
      getFeature

      from the CoreDocumentImpl.
      Those parameters accessed by an instance variable in the CoreDocumentImpl.
      Moreover, the orthogonality is the design would be enhanced.

      What do you think about that?

      Attachments

        Activity

          People

            Unassigned Unassigned
            joaoplm João Paulo Lemes Machado
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: