[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: disable-output-escaping

Subject: Re: disable-output-escaping
From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx>
Date: Mon, 01 Jul 2002 11:32:45 -0400
xml comment disable
Michael,

Unfortunately what you're getting is a parser error, which is as it should be since your file is not well-formed XML. This is a funny way of saying it's not XML because it doesn't follow the XML rules.

An '&' character simply can't appear in XML except as an open delimiter for an entity (or character) reference. Your error is telling you this by saying that whitespace is not allowed after the &, since it wants to see a name (for the entity or character reference) but sees a space instead.

If you fix whatever process is generating your pseudo-XML so that this character is represented as &amp;, you'll be fine. Or you can wrap the entire string in a CDATA marked section (another way of doing the same thing).

But no amount of fussing with the XSL will get around this problem since the process breaks before the XSL processor ever gets to see the data.

Cheers,
Wendell

At 10:38 AM 7/1/2002, you wrote:
I have elements in my XML document that could contain character entities but
should be treated as text...

        <Comments>Comments about loss description:  Adding some comments
here & testing the section </Comments>


Ive tried using combinations of <xsl:output method= "text">, and the <xsl:value-of select="Comments" disable-output-escaping="yes"/>, but Im using them incorrectly. I am getting this error:

Whitespace is not allowed at this location. Error processing resource
'file:///C:/APA/XSLT/Auto Report Project/FNOLReport8.xml'. Line 18, Position
75
   <Comments>Comments about loss description:  Adding some comments here &
testing the section</Comments>
----------------------------------------------------------------------------
----------------------^


How do I set this up so <Comments> sections display text and instruct the XML parser to bypass processing these characters? The output is HTML.

Mike


********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the sender and postmaster@xxxxxxxxxx **********************************************************************



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


======================================================================
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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.