[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Removing Newlines
Sorry to bother the collective twice in one day...
I need to remove newlines from the <o><o/> element in the following XML: <Synopsis> <c>mmerge</c> <o>[-n] [-to <var>tag</var>|<var>rev</var>] [-from <var>tag</var>|<var>rev</var>] [-v[<var>N</var>]] [-mytag] [-noeditor] [mput_options] <var>file</var>...</o>
Yes or no, I then tried a normalize-space function on the <o> element, but this made the transformed text ignore the <var> child element translation instructions. My next step was to try to use translate function to translate newlines into whitespace. I did it like this: <!-- o template --> <xsl:template match="o"> <xsl:text /><xsl:value-of select="translate(.,' ','')" /><xsl:text /> </xsl:template> But again, this misses the var elements (they're not translated). So what I need is a way to strip out newline characters that appear in the source XML, but for source that has child elements that will be transformed. Thanks for any help, --gk Greg Kushmerek Sr. Technical Writer IA/Tools The MathWorks (+1) 508-647-7136 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
|