Re: [xsl] Dealing mixed content with invalid node-like text

Subject: Re: [xsl] Dealing mixed content with invalid node-like text
From: Brandon Ibach <brandon.ibach@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 9 Dec 2011 13:08:49 -0500
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 :)

Current Thread