Re: [xsl] Ignoring specific characters like > in the XML while doing XSLT

Subject: Re: [xsl] Ignoring specific characters like > in the XML while doing XSLT
From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx>
Date: Fri, 17 Oct 2003 14:39:11 -0400
Dipesh,

The thing is, using output method="text", it's as if DOE is always on, so switching it on does nothing. [XSLT 16.4: "The text output method ignores the disable-output-escaping attribute, since it does not perform any output escaping.]

At 10:49 AM 10/17/2003, you wrote:
My output method is text and i have defined it like this.

<xsl:output method="text" encoding="UTF-8"/>

And in the input xml file i am getting value like this at one place

<myTag NAME="Identifier">HL-DT-ST CD-ROM GCR-8480Bema"&gt;</ATTRIBUTE>

and there is one end of line character after  &gt; and then question mark is
there. I guess this file is generated by some tool and there must be some
goofing somewhere which is producing output like this.

So do you mean with ouput method as text, i won't be able to use DOE ?

I can't change my output method from text to xml. Are there any other ways to
escape those.

If your output is otherwise plain text but you want ">" to appear as "&gt;", you can use a recursive string-replacement routine in your stylesheet (check exslt.org) to escape the problematic characters.


Cheers,
Wendell


====================================================================== Wendell Piez mailto:wapiez@xxxxxxxxxxxxxxxx Mulberry Technologies, Inc. http://www.mulberrytech.com 17 West Jefferson Street Direct Phone: 301/315-9635 Suite 207 Phone: 301/315-9631 Rockville, MD 20850 Fax: 301/315-8285 ---------------------------------------------------------------------- Mulberry Technologies: A Consultancy Specializing in SGML and XML ======================================================================


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



Current Thread