Subject: [xsl] XSLT Replace for '<?xml:namespace>? From: Steven Kaminski <shkaminski@xxxxxxxxx> Date: Tue, 11 Sep 2007 22:23:15 -0700 (PDT) |
I'm stuck trying to eliminate an opening tag from an XML file. Keep in mind: I cannot change the format of the source file. It has HTML embedded in a CDATA section. I am running a series of regex replaces and concats to clean up the source. But occasionally the source file has a "<?xml:namespace prefix = lbxrt />" tag stuck in the HTML section that I need to simply delete. I am trying to use a regex group replace to do this, but regex always leaves "<?" no matter what I do. It's as if it starts the match after the "?". I tried wrapping this element in a CDATA section, but had the same problem--the match came after "?". This tag can appear anywhere in the CDATA section in the source file--so I can't simply look for it in a particular place. Please give me any ideas. Thanks. Processor: Saxon 8.9.0.3 XSLT 2.0 Regex match: <xsl:analyze-string select="." regex="(<?xml:namespace prefix = lbxrt /&g t;)"> Source: <DIV OLDID="divContent"><?xml:namespace prefix = lbxrt /><lbxrt:rich-text xmlns="http://www.w3.org/1999/xhtml"; xmlns:lbxrt="http://www.libronix.com/xmlns/rich-text";> Result: <DIV OLDID="divContent"><?<lbxrt:rich-text xmlns="http://www.w3.org/1999/xhtml"; xmlns:lbxrt="http://www.libronix.com/xmlns/rich-text";> _____________________________________________________________________________ _______ Need a vacation? Get great deals to amazing places on Yahoo! Travel. http://travel.yahoo.com/
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Escaped markup 2 temporar, David Carlisle | Thread | RE: [xsl] XSLT Replace for '<?xml:n, Michael Kay |
Re: [xsl] Connecting to Data Base u, bryan rasmussen | Date | [xsl] merging xml's using XSLT, mer, Senthil Nathan |
Month |