473,407 Members | 2,312 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

Apostrope problem with xalan 2.7.0

Hi everyone,

While using xalan 2.1.0 and xerces 1.4.3 jars, the out file will have
the "'" in place of
" ' " Literal in input file.
When we use the latest version of xalan 2.7.0 and xerces 2.8.0, it will
result the same " ' " literal in out file,

The classes and methods that we suspected regarding this conversion are
OutputFormat format = new OutputFormat ("xml", encoding, indentResult);

format.setOmitXMLDeclaration (true);

serializer = new XMLSerializer (outputStream, format);

We need "'" in output file, can anyone help me in this regard.
Thanks and Regards
Nirmal JS

Aug 29 '06 #1
2 1349


Nirmal wrote:

While using xalan 2.1.0 and xerces 1.4.3 jars, the out file will have
the "'" in place of
" ' " Literal in input file.
When we use the latest version of xalan 2.7.0 and xerces 2.8.0, it will
result the same " ' " literal in out file,
We need "'" in output file, can anyone help me in this regard.
Why? The only requirement to escape the single quote is if you have an
attribute value delimited by single quotes where the value contains a
single quote e.g.
<element att1='&apos;'>
Otherwise a literal single quote ' works just fine.

--

Martin Honnen
http://JavaScript.FAQTs.com/
Aug 29 '06 #2
In article <11**********************@m73g2000cwd.googlegroups .com>,
Nirmal <js******@gmail.comwrote:
>We need "&apos;" in output file, can anyone help me in this regard.
You shouldn't rely on this. XML tools may produce any equivalent
output (and &apos; is equivalent to an apostrophe), so you will always
be at risk of getting the "wrong" thing if you demand &apos;.

Of course, if you are processing the output as an XML document, it
should work perfectly well whichever you get.

-- Richard
Aug 29 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: al dav | last post by:
Hi all ok i am not a java programmer I am a sys-admin, my users want xalan and have already got j2sdk_1.4.2 so i have downloaded it and set the CLASS_PATH export...
0
by: Jeroen N. Witmond | last post by:
Does anybody have ant experience with xalan http://xml.apache.org/xalan-c/overview.html on RedHat 9? Do you use the binary distribution for RH7.2 or did you build xalan from its source? Or did you...
0
by: Guillaume Jeudy | last post by:
Hi, I'm trying to serialize a DOM constructed from the following URL which is subject to change very frequently: ...
2
by: Collin VanDyck | last post by:
I'm using Xalan's TransformerIdentityImpl class to provide a nice base framework upon which to write SAX transformers. However, using the identiy transform, I'm getting some weird output issues....
7
by: Ganesh Gella | last post by:
Hi All, I am planning to use Xalan to transform XML data by applying xls stylesheets. Here tricky part is, Xalan provides several C++ APIs, which are very much useful if our requirement is...
5
by: John | last post by:
I'm trying to generate HTML using a SAX TransformHandler. The problem I'm having is related to the xalan transformer using the shorthand notation when it writes out an empty textarea tag. My...
3
by: Avalon1178 | last post by:
Hi, I recently downloaded the xalan-c source code in http://mirrors.ccs.neu.edu/Apache/dist/xml/xalan-c I followed the instructions from the apache site on how to build it (I already have...
3
by: Anonymous | last post by:
Has anyone managed to build Xalan v 1.10 using VS 2005? If the VS 7 project is converted to VS 8.0., it generates *TONS* of errors - anyone managed to build this yet?
3
by: awebguynow | last post by:
What are the rules for classpath, when using Xalan on the command line? I'm using java J2SE 1.6.0 but haven't used Xalan for a while and ran into all kinds of troubles today. Of course, I went...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.