Message:

   The following issue has been closed.

---------------------------------------------------------------------
View the issue:
  http://issues.apache.org/jira/browse/XERCESC-50

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: XERCESC-50
    Summary: DOMString bug
       Type: Bug

     Status: Closed
 Resolution: CANNOT REPRODUCE

    Project: Xerces-C++
 Components: 
             DOM
   Versions:
             1.4

   Assignee: 
   Reporter: faboire

    Created: Wed, 2 May 2001 8:53 AM
    Updated: Tue, 19 Oct 2004 11:09 AM
Environment: Operating System: Linux
Platform: PC

Description:
On linux slackware 7.1  kernel 2.4.4
gcc version :2.95.2
platform :i686
Xerces-C vers 1.4
local setting in .cshrc
  if ($status == 0) stty cs8 -istrip -parenb
  setenv LC_CTYPE ISO-8859-1
  setenv LANG fr_CA

Desc : DOMString.length return length 0 and can't retreive the value from
 is node (TEXTNODE) when we give him a string containing latin (french) 
character.

First, I parse the XML document (containing the french accents) with SAX
and it works perfectly. The data is stored in map (string keyname and string 
value) and the accents are keept. Then after we get data from map and put them 
all in DOM tree to do a XML file.

This is the problem: If I insert a string to a text DOM node without accent
the node get the data without problem (we can extract data successfully) but if 
I put 1 or more accent wherever the position, I retreive nothing from Dom node
but the Dom node pointer is not NULL

I checked the string before inserting it, in the TEXTNODE and all the accents 
apprear. I insert data in DOM node like this :
 
mapElem.appendChild(doc.createTextNode(thisMap->mapit(keyname).c_str()));

Ps : I can't retreive data with rawBuffer() function if the node contains 
 French accents

I changed my locale a lot of time (default, with iso-8859-1, etc) and it
does nothing.

This is the small XML and DTD file i use :
XML:
<?xml version="1.0" encoding="ISO-8859-1"?>
<TEST>
<CFG id="W_ORDER_NOT_REVIEWED"><EN>This order as been submitted but hasn't been 
reviewed yet.</EN><FR>Cette commande a été soumise et sera traitée sous 
peu.</FR></CFG>
<CFG id="W_ORDER_PROCESSING"><EN>This order is being processed.</EN><FR>Cette 
commande est en traitement.</FR></CFG>
<CFG id="W_ORDER_COMPLETED"><EN>This order is completed.</EN><FR>Cette commande 
a été traitée et complétée.</FR></CFG>
<CFG id="W_ORDER_CANT_PROCESS"><EN>This order will not be 
processed.</EN><FR>Cette commande ne sera pas traitée.</FR></CFG>
</TEST>

DTD:
<?xml encoding="ISO-8859-1"?>
<!ELEMENT TEST (CFG)+>
<!ELEMENT CFG (#PCDATA|EN|FR|ES)*>
<!ATTLIST CFG id ID #REQUIRED>
<!ELEMENT EN (#PCDATA)>
<!ELEMENT FR (#PCDATA)>
<!ELEMENT ES (#PCDATA)>

Thanks in advance for your help 
Martin


---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.

If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa

If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to