The Html is in the form of: <html><body><div><span attr1="double space" >some text </span></div></html>
Henry Zongaro wrote: > > Hi, Kapil. > > Kapil <[EMAIL PROTECTED]> wrote on 2007-08-14 12:40:27 AM: >> Thanks for the reply Henry. >> The input is HTML and am using following code for transformation >> StringReader reader = new StringReader(htmlText); >> InputSource inputSource = new InputSource(reader); >> Document doc = documentBuilderFactory.newDocumentBuilder().parse( >> inputSource); >> htmlToXmlTransformer.transform(new DOMSource(doc), >> new StreamResult(resultStringWriter)); >> >> The attribute name attr1 was just an example. Yes, I think the attribute >> value is getting normalized but XML Spy is able to preserve the extra > white >> spaces on transformation. Is there any way to tell parser to retain > white >> spaces? > > I would expect most typical HTML documents to cause an XML parser to fail > to parse the document, that's why I had to ask whether the input was > really HTML and not XHTML. May I ask you to provide an actual complete > sample of your input that demonstrates the problem? Please include any > document type declaration. > > Thanks, > > Henry > ------------------------------------------------------------------ > Henry Zongaro XSLT Processors Development > IBM SWS Toronto Lab T/L 969-6044; Phone +1 905 413-6044 > mailto:[EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/Preserving-whitespaces-in-attribute-value-during-xsl-tranformation-tf4261429.html#a12178005 Sent from the Xalan - J - Users mailing list archive at Nabble.com.