Try removing the space before the ‘X’ in tex4ht.env and using the following NSGMLS make file adjusted to your system.
all: ${ext}
html:
rm -f temp.html
rm -f fooo
###################### ${name}.${ext}
sed ${sedDTD} < ${name}.${ext} > temp.html
${nsgmls} -e 's/${dtdx}/nsgmls ${dclx} temp.html/' \
-e 's/${dtd4}/nsgmls ${dcl} temp.html/' \
-e 's/${dtd32}/nsgmls ${dcl} temp.html/' > fooo
chmod 700 fooo
fooo name=${name} ext=${ext} ######## ${name}.${ext}
#====================== ${name}.${ext}
tmp:
css:
#####################################################################
nsgmls = grep '<!DOCTYPE' ${name}.${ext} | sed
dcl = -s ${path}\/html.dcl
dclx = -wxml -wall -c ${path}\/catalog -s ${path}\/xml.dcl
dtdx = <\!DOCTYPE .* "-\/\/W3C\/\/DTD XHTML 1.0 Transitional\/\/EN"
dtd4 = <\!DOCTYPE .* "-\/\/W3C\/\/DTD HTML 4.0 Transitional\/\/EN"
dtd32 = <\!DOCTYPE html PUBLIC "-\/\/W3C\/\/DTD HTML 3.2\/\/EN"
sedDTD= -e 's/PUBLIC .*DTD XHTML.*"/SYSTEM "${path}\/xhtml.dtd">/g' \
-e 's/PUBLIC .*DTD MATHML.*"/SYSTEM "${path}\/mathml.dtd">/g' \
-e 's/PUBLIC .*DTD HTML 3.2.*"/SYSTEM "${path}\/html32.dtd">/g' \
-e 's/PUBLIC .*DTD HTML 4.0.*"/SYSTEM "${path}\/html4.dtd">/g' \
-e 's/"http:\/\/www.w3.org\/TR\/.*\/.*dtd">//' \
-e 's/"http:..www.w3.org.pub.WWW.MarkUp.Wilbur.HTML32.dtd">//'
path = .......
#####################################################################