HomeClusterLabs Projects

Refactor: libcrmcommon: best practices for internal XML-related functions

Description

Refactor: libcrmcommon: best practices for internal XML-related functions

This is part of a project to ensure all internal library functions follow
current naming and copyright guidelines, have doxygen blocks, and use the new
standard function return codes where appropriate.

I'm starting a new naming convention to hopefully have names that are shorter
but still readable. We already have some defined constants starting with
PCMK__XA_ to indicate that they are XML attribute names. This extends that to
use "xe" to indicate "XML element".

My suggestion is that we continue to use "xml" in function names when the
function operates on arbitrary XML nodes, but use "xe" for functions that only
take XML elements and "xc" for functions that only take XML comments. Hopefully
if those are used consistently, they will be easily memorable.

Details

Provenance
kgaillotAuthored on Jul 9 2020, 9:27 AM
Parents
rPba2867002912: Refactor: libcrmcommon: best practices for static XML functions
Branches
Unknown
Tags
Unknown

Event Timeline