\documentclass{article}
\usepackage{latexml}
\lxDeclare[role=ID]{$a$}%
\lxDeclare[role=ID]{$b$}%
\lxDeclare[role=ID]{$c$}%
\lxDeclare[role=ID]{$d$}%
\lxDeclare[role=ID]{$e$}%
\lxDeclare[role=FUNCTION]{$f$}%
\lxDeclare[role=FUNCTION]{$g$}%
\lxDeclare[role=FUNCTION]{$h$}%
\begin{document}

\[ \{ a \} \]
\[ \{ a : a\in b \} \]
\[ \{ a | a\in b \} \]

\[ \{ a | a\in b \}_{c=0} \]

\[ \{ x | x \not\in \{ y | y > 0 \} \} \]

\[ \left\{ x \middle| x\in S \right\} \]

\end{document}
