You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by "Scott Cantor (JIRA)" <xe...@xml.apache.org> on 2017/07/17 19:42:00 UTC

[jira] [Commented] (XERCESC-2106) Refactoring of CoreDocumentImpl

    [ https://issues.apache.org/jira/browse/XERCESC-2106?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16090430#comment-16090430 ] 

Scott Cantor commented on XERCESC-2106:
---------------------------------------

I'm not sure what class you're referring to, but unless this is addressing a real problem, or eliminating a lot of duplicate code somewhere, I think the bar is pretty high to be taking this on just to make changes. There are dozens of serious complex bugs open and that's where time should be spent, I think.

> Refactoring of CoreDocumentImpl
> -------------------------------
>
>                 Key: XERCESC-2106
>                 URL: https://issues.apache.org/jira/browse/XERCESC-2106
>             Project: Xerces-C++
>          Issue Type: Improvement
>          Components: DOM
>            Reporter: João Paulo Lemes Machado
>
> 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?



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org