You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by "Williamson, Siehnai" <sw...@docucorp.com> on 2000/05/12 16:53:48 UTC

Difference between Xerces-C & XML4C++?

Hello,

I heard previously on this board that the ICU is not required for Xerces-C
as it is for XML4C++--is that true?  I don't want to have to use ICU.  What
does Xerces use in its place for transcoding?  What is the main difference
between Xerces-C and XML4C++?

Thanks,
Siehnai

Re: Difference between Xerces-C & XML4C++?

Posted by Dean Roddey <dr...@charmedquark.com>.
Also, not that you *must* have some transcoder installed, even if you just
use the intrinsic encodings. This is because it also handles local code page
(LCP) transcoding. You can though, for instance, take the Win32 transcoder
and stip out the XMLTranscoder stuff and keep the XMLLCPTranscoder stuff.
But, given the small amount of code in the Win32 transcoder, there wouldn't
be much to gain from doing that.

We don't really have a 'do nothing' transcoder because it still has to do
that LCP transcoding, which must be done either via ICU or via local
services. But the amount of code in the Win32 and IConv transcoders is small
enough that there shouldn't be many worries of using them in terms of code
size or distribution size. 99% of the code for transcoding, when using those
two, is in the OS already anyway. Its only in the case of the ICU
transcoder, which gets you lots of encodings but which is large, that you
might be concerned with these issues.

FYI, the current set of intrinsic transcoders is a little bigger than
Arundhati indicated. It is:

1. UCS-4 (b&l)
2. UTF-16 (b&l)
3. UTF-8
4. US-ASCII
5. The two EBCDICS (037 and 1140)
6. Latin1 (ISO-8859-1)
7. Windows 1252

--------------------------
Dean Roddey
The CIDLib Class Libraries
Charmed Quark Software
droddey@charmedquark.com
http://www.charmedquark.com

"Give me immortality, or give me death"



Re: Difference between Xerces-C & XML4C++?

Posted by Arundhati Bhowmick <ar...@hyperreal.org>.
Although Mike is right I'd like to take a little more liberty in explaining it further in
detail how the procedure works so that there's no confusion over it for others.

As far as the source code is concerened  xml4c and xerces are exactly the same. The two basic
points that make it different are
1. Binary packaging
2. Transcoding feature in it.
Binary Packaging - When the source code is compiled (on unix) there's an option -t (used in
runConfigure script) to choose what transcoding to use. During this time while distributing
xml4c we use "-ticu" where as for xerces its default "-tnative" (which is iconv). (on Windows
its by inclusion of  icu library and define statements XML_USE_ICU_TRANSCODER or
XML_USE_WIN32_TRANSCODER)  So,  while building xml4c we need to build icu first and use that
library to build xml4c.Where as xerces building is without icu.

Transcoding feature -The inclusion of icu is mainly beacuse of its transcoding capabilities
for various encodings. In the initial design we had xml-c completely dependent on icu for
transcoding. Later due to dll and library complications in various platforms and other
performance reason we decided to support the essential and minimal support of transcoders in
xml source itself. So, due to this now our source have three different kinds of transcoders
(as Mike said) - icu, iconv and win32. Win32 (for windows platform) and iconv(for unix
platforms) trancoders support native encodings in xml for UTF-8, UTF-16( big and little
endian), UCS-4(big and little endian), US-ASCII and ebcdic(ibm-1140, ibm-037). So, if one is
using any of these encodings in their xml file one doesnot need icu to be binded with xml-c
For any other encoding (such as chinees or japanees) one MUST have icu to parse the xml file
properly.
So, the need for usage of xml4c or xerces is determined by the need for icu or not which in
turn is determined by the user for the kind of encoding that's used. Hopefully this will
clarify the issue now.

Arundhati

Mike Pogue wrote:

> XML4C = Xerces-C + ICU
>
> Xerces-C has three ways to get transcoding support (it's a build time choice):
>
>         1) ICU
>         2) iconv
>         3) Win32 transcoding (on Win32 only, of course)
>
> If you don't use any of those, you can still use Xerces-C, but you only
> get UTF-8 and UTF-16, basically.  If you want something more (like Shift-JIS),
> you'll need one of the three solutions above.
>
> Mike
>
> > "Williamson, Siehnai" wrote:
> >
> > Hello,
> >
> > I heard previously on this board that the ICU is not required for Xerces-C as it is for
> > XML4C++--is that true?  I don't want to have to use ICU.  What does Xerces use in its
> > place for transcoding?  What is the main difference between Xerces-C and XML4C++?
> >
> > Thanks,
> > Siehnai
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-c-dev-help@xml.apache.org


Re: Difference between Xerces-C & XML4C++?

Posted by Mike Pogue <mp...@apache.org>.
XML4C = Xerces-C + ICU

Xerces-C has three ways to get transcoding support (it's a build time choice):

	1) ICU
	2) iconv
	3) Win32 transcoding (on Win32 only, of course)

If you don't use any of those, you can still use Xerces-C, but you only
get UTF-8 and UTF-16, basically.  If you want something more (like Shift-JIS),
you'll need one of the three solutions above.

Mike

> "Williamson, Siehnai" wrote:
> 
> Hello,
> 
> I heard previously on this board that the ICU is not required for Xerces-C as it is for
> XML4C++--is that true?  I don't want to have to use ICU.  What does Xerces use in its
> place for transcoding?  What is the main difference between Xerces-C and XML4C++?
> 
> Thanks,
> Siehnai