This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: disable-output-escaping


if & character appears in the XML then it is supposed to be not a welformed XML. You can not proceed to XSL solution without sorting out the & character in the XML. I think you should check up the code that
forms the XML file and make sure that characters like & , > , < , " , ' are replaced with &amp; , &gt; &lt;, &quot; and &apos; respectively..
or..
You have another option.. if you think that some element in the XML may have characters like this, then you put these characters under CDATA Section
in your case..
<Comments>
<![CDATA[
Comments about loss description: Adding some comments
here & testing the section
]]>
</Comments>
Then you can simply finish off the task by writing <xsl:value-of select="Comments"/> in XSL

Vasu...



From: "CROFT, MICHAEL" <MCROFT@amica.com>
Reply-To: xsl-list@lists.mulberrytech.com
To: "'xsl-list@lists.mulberrytech.com'" <xsl-list@lists.mulberrytech.com>
Subject: RE: [xsl] disable-output-escaping
Date: Mon, 1 Jul 2002 11:21:46 -0400

The & is a character that could be entered by the user, I have no control
over what they enter.  It is a dynamic process.  I need to tell the XML
parser to treat any text entered by the user as text.

		-----Original Message-----
		From:	Henk Meulekamp [mailto:henkm@ccni.nl]
		Sent:	Monday, July 01, 2002 11:21 AM
		To:	'xsl-list@lists.mulberrytech.com'
		Subject:	RE: [xsl] disable-output-escaping

		use &amp; instead of &

		| -----Original Message-----
		| From: CROFT, MICHAEL [mailto:MCROFT@amica.com]
		| Sent: maandag 1 juli 2002 16:38
		| To: 'xsl-list@lists.mulberrytech.com'
		| Subject: [xsl] disable-output-escaping
		|
		|
		| 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@amica.com.
		|
**********************************************************************
		|
		|
		|
		|  XSL-List info and archive:
http://www.mulberrytech.com/xsl/xsl-list
		|

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

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



_________________________________________________________________
Chat with friends online, try MSN Messenger: http://messenger.msn.com


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]