Share

Expat XML Parser

Tracker: Bugs

8 Default namespace => wrong element names - ID: 566334
Last Update: Comment added ( kwaclaw )

When a document uses a default namespace and expat
is set up to be aware of namespaces the tag names
reported in the endElementHandler become incorrect.

It seems that the endElementHandler always reports
the same thing that was last reported in the
startElementHandler.

With a document as follows and with the namespace
separator char set to '@'

<smil xmlns="http://w3.org/SMIL20/">
<head>
<title>Test</title>
</head>
<body>
</body>
</smil>

the start and end element handlers of expat will report

start: http://w3.org/SMIL20/@smil
start: http://w3.org/SMIL20/@head
start: http://w3.org/SMIL20/@title
end: http://w3.org/SMIL20/@title
end: http://w3.org/SMIL20/@title <-- should be head
start: http://w3.org/SMIL20/@body
end: http://w3.org/SMIL20/@body
end: http://w3.org/SMIL20/@body <-- should be smil

This has been observed in the win32 version of 1.95.3
with XML_UNICODE_WCHAR_T defined.

I had a quick look at the tag structure and saw that
localName had the correct value. If namespace
processing is turned off the correct names are reported.

/Roland

d95-rpe@nada.kth.se





Nobody/Anonymous ( nobody ) - 2002-06-09 01:06

8

Closed

Fixed

Karl Waclawek

None

None

Public


Comments ( 4 )

Date: 2002-06-13 12:57
Sender: kwaclawSourceForge.net DonorProject Admin

Logged In: YES
user_id=290026

Patch # 567035 was checked in.

Karl


Date: 2002-06-12 14:42
Sender: kwaclawSourceForge.net DonorProject Admin

Logged In: YES
user_id=290026

This bug was actually my fault, introduced when
I fixed the NSTriplets functionality. I took out a
section of code I thought was redundant. :-(

My apologies,

Karl


Date: 2002-06-10 19:57
Sender: kwaclawSourceForge.net DonorProject Admin

Logged In: YES
user_id=290026

This problems looks as if it could be an old bug
that has existed for a long time. It actually happens
whenever multiple nested elements use the same prefix.

Could anyone please test this with Expat 1.95.2?

I have submitted a patch (# 567035).
Please review and test.

Karl


Date: 2002-06-09 01:32
Sender: kwaclawSourceForge.net DonorProject Admin

Logged In: YES
user_id=290026

I can confirm your observation, even for the
case of XML_UNICODE_WCHAR_T not defined,
and using "^" as namespace separator.

Can anybody duplicate this on another platofrm?

Karl


Attached File

No Files Currently Attached

Changes ( 5 )

Field Old Value Date By
status_id Open 2002-06-13 12:57 kwaclaw
resolution_id None 2002-06-13 12:57 kwaclaw
close_date - 2002-06-13 12:57 kwaclaw
assigned_to nobody 2002-06-10 19:57 kwaclaw
priority 5 2002-06-09 01:32 kwaclaw