[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Dealing mixed content with invalid node-like text
On Thu, Dec 8, 2011 at 4:16 PM, Karlmarx R <karlmarxr@xxxxxxxxx> wrote: > Brandon - Thanks for that <xsl:value-of select="replace($unparsed, '<(\S+\s+\.)>','<$1>')"/> suggestion. With a slight modification - removing \s, I can use this for my specific use (pls see next point). Btw, if a solution available to cover wider scope, I think that would be more beneficial. I'm not sure why you need to remove the \s. The '<(\S+\s+\.)>' regex matches a less-than symbol, one or more non-whitespace (\S) characters, one or more whitespace (\s) characters, a period (\.) and then a greater-than symbol. You didn't give a general pattern for the non-XML sequences, so I had to guess based on the examples. I'm not sure what you mean by "wider scope". Would this be other types of non-XML data in the source that needs to be encoded properly? Can you give some patterns that need to be recognized? -Brandon :)
|
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
|