This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: string replacement for HTML tags



> But without d-o-e is there any alternative?

You mean to get from [foo] to <foo/> or <x>foo</x>? Yes of course that can be
done just using XSLT. I have, in production here at NAG stylesheets not
using any extensions (not even node-set) that parse arbitrarily deeply
nested {} brackets (and other TeX derived markup) and convert to XML (or
HTML, depending)


> ... as XML - can cause great problems, if the [] were not correct 
> structured (in the sense of XML).

if there is a chance that the incoming [] are not correctly matched then
you should definitely use a recursive template approach, so you can
catch these cases, rather than just blindly translate() [ to < and so
produce non-well formmed XML which is neither use nor ornament.

David


_____________________________________________________________________
This message has been checked for all known viruses by Star Internet
delivered through the MessageLabs Virus Scanning Service. For further
information visit http://www.star.net.uk/stats.asp or alternatively call
Star Internet for details on the Virus Scanning Service.

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]