ns_tagelement and ns_formvalueput are both incapable of handling well-formed XHTML syntax, especially in the face of properly closed <input /> elements. In addition, ns_formvalueput generates invalid XHTML syntax, in two ways: it does not provide values for CHECKED or SELECTED attributes, and it spells them in upper case.