[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: element nodes in a string?
Chris,
You're doing great with this -- the recursive template to process the text string is just about right -- but unfortunately you've now taken XSLT 1.0 about to the limit of what it can do with this, at any rate easily. XSLT is just not built to support processing on plain text, which is what you're trying to do. Maybe with an extension function such as node-set(), or the ability to match on ranges of characters, or some other capability not described in the 1.0 spec, someone can see a way to go further and catch the nestings you are (rightly) concerned about. Heck, I'll bet someone on this list could even offer a solution in XSLT 1.0. I'd sure like to see it: but it'll fall into the "teaching a dog to dance" category. This would be much, much easier in Omnimark or Perl -- Omnimark is designed for just this kind of conversion, and Perl excels at plain text processing. Or Python, or.... (Sometimes, a wrench just isn't the right tool. Now, if you were going from structured markup *into* plain text, it'd be easy.) Good luck, Wendell At 09:42 PM 5/24/01, you wrote: I am a complete XML/XSLT newbie. I have spent a lot of time reading the FAQ and archives, but I can't find an answer to my problem. 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
|