You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xalan.apache.org by dipesh <di...@erevmax.com> on 2010/04/05 07:39:08 UTC

problem in disable-output-escaping

Hi All,

 

I used XSLT for transforming one xml to another xml.

 

Input XML contain some ISO 8859 value like 

 

                                    <Address Type='1'>

                                        <AddressLine></AddressLine>

 
<CityName>&#246;&#233;&#217;&#210;</CityName>


                                    </Address>

 

I am using xslt which looks like this 

 

                  <?xml version="1.0" encoding="UTF-8"?>

<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >

<Address>

                       <xsl:attribute name="Type" namespace="">

                             <xsl:value-of
select="string($var32_ProfileInfo/ns0:Profile/ns0:Customer/ns0:Address/@Type
)"/>

                       </xsl:attribute>                      

                           <AddressLine>

                               <xsl:value-of
select="string(ns0:Customer/ns0:Address/ns0:AddressLine)"/>

                           </AddressLine>

                           <xsl:text disable-output-escaping="no"
>"&#246;&#233;&#217;&#210;"</xsl:text>

                           <CityName>

                             <xsl:value-of
select="$var32_ProfileInfo/ns0:Profile/ns0:Customer/ns0:Address/ns0:CityName
" disable-output-escaping="yes"/>

                           </CityName>

                    </Address>

                  </xsl:stylesheet>

 

Now I want that output xml shold be like this

 

                  <Address Type='1'>

                                        <AddressLine></AddressLine>

                                         &#246;&#233;&#217;&#210;

 
<CityName>&#246;&#233;&#217;&#210;</CityName>


                                    </Address>

 

But it gives output like this

 

                                   <Address Type='1'>

                                        <AddressLine></AddressLine>

                                         öéÙÒ

                                        <CityName>öéÙÒ</CityName>


                                    </Address>

 

 

Can anybody can tell me how I can solve this problem

 

 


DISCLAIMER
This email message and any accompanying attachments may contain confidential information.
If you are not the intended recipient, do not read, use, disseminate, distribute or copy 
this message or attachments. If you have received this message in error, please notify the
sender immediately and delete this message. Any views expressed in this message are those 
of the individual sender, except where the sender expressly, and with authority, states 
them to be the views of eRevMax Technologies, Inc. Before opening any attachments, please
check them for viruses and defects.

RE: problem in disable-output-escaping

Posted by dipesh <di...@erevmax.com>.
Thanks Michael Ludwig,

It is working

I have used encoding ="ISO 8859"

Dipesh Garg

-----Original Message-----
From: Michael Ludwig [mailto:milu71@gmx.de] 
Sent: Monday, April 05, 2010 4:47 PM
To: xalan-j-users@xml.apache.org
Subject: Re: problem in disable-output-escaping

dipesh schrieb am 05.04.2010 um 11:09:08 (+0530):

> Now I want that output xml shold be like this

> <CityName>&#246;&#233;&#217;&#210;</CityName>

> But it gives output like this

>                                         <CityName>öéÙÒ</CityName>

Use: <xsl:output encoding="us-ascii"/>

-- 
Michael Ludwig

DISCLAIMER
This email message and any accompanying attachments may contain confidential information.
If you are not the intended recipient, do not read, use, disseminate, distribute or copy 
this message or attachments. If you have received this message in error, please notify the
sender immediately and delete this message. Any views expressed in this message are those 
of the individual sender, except where the sender expressly, and with authority, states 
them to be the views of eRevMax Technologies, Inc. Before opening any attachments, please
check them for viruses and defects.

Re: problem in disable-output-escaping

Posted by Michael Ludwig <mi...@gmx.de>.
dipesh schrieb am 05.04.2010 um 11:09:08 (+0530):

> Now I want that output xml shold be like this

> <CityName>&#246;&#233;&#217;&#210;</CityName>

> But it gives output like this

>                                         <CityName>öéÙÒ</CityName>

Use: <xsl:output encoding="us-ascii"/>

-- 
Michael Ludwig