[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: XT, HTML, and &nsbp;
> If you input > &nbsp; > > then you are putting four characters into the text node of > the result tree > but you just want one. > >   Perhaps a more helpful explanation:   will put the literal non-breaking space character in the result tree, like if you had a key on your keyboard where you could type a non-breaking space. The HTML output document that is *derived from* the result tree will (or should, rather) have this single character replaced with the full " " (5 chars). This was the source of much confusion for me at first. You are transforming a source tree into a result tree, and then telling the XSLT processor that you'd like for a certain kind of output to be derived from the result tree. The stylesheet is defining the tree transformation, not the literal, formatted contents of the result tree as they're intended to be output. Your declaration of the HTML 4.0 URI for the result namespace is telling the XSLT processor that you would *like* the result tree to be output as an HTML 4.0 document, which means, more or less, that the result tree that you've defined in terms of well-formed HTML (i.e., XML) should be output as serialized text after the processor: - emits a <!DOCTYPE> prolog - entifies certain characters like your non-breaking space, - removes extraneous slashes from empty elements (like <br/>) - removes unnecessary closing tags (like </li>) XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|