try
{
ElementImpl elem = (ElementImpl) child;
if(null == doc.m_xpathContext)
doc.m_xpathContext = new org.apache.xpath.XPathContext(doc);
WhiteSpaceInfo info =
stylesheet.getWhiteSpaceInfo(doc.m_xpathContext,
elem);
boolean shouldStrip;
if (null == info)
{
shouldStrip = sh.getShouldStripWhitespace();
}
else
{
shouldStrip = info.getShouldStripSpace();
}
sh.setShouldStripWhitespace(shouldStrip);
}
catch (TransformerException se)