[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Whitespace question
At 04:56 18-09-2001, Ragulf Pickaxe wrote:
Christopher R. Madsen wrote: Something like preceding-sibling::node()[1]self::text(), which will be empty if the preceding node doesn't exist or is something other than a text node. I am in the situation where I have lots of different kinds of parrent nodes before the <code1> node, so I can't use the <xsl:perseve-space="code"/> unless I wish to write this line sixty times with different elements. You could also do <xsl:preserve-space elements="*"/>. I need the program to add a space if there is a new node right after, only if there is a space between them: In order to distinguish these two cases, you *must* preserve spaces. Once the space is stripped, they are identical, and no amount of XSLT wrangling will help. Your options are (1) xml:space="preserve" in the original XML, (2) xsl:preserve-space in the XSLT, or (3) some switch to MSXML itself before beginning the transformation. HTH, Chris -- Christopher R. Maden, Principal Consultant, HMM Consulting Int'l, Inc. DTDs/schemas - conversion - ebooks - publishing - Web - B2B - training <URL: http://www.hmmci.com/ > <URL: http://crism.maden.org/consulting/ > PGP Fingerprint: BBA6 4085 DED0 E176 D6D4 5DFC AC52 F825 AFEC 58DA 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
|