#34103 [Asn->Csd]: line numbering not maintained in dom document
| From: | rrichards@php.net | Date: | Mon, 15 Aug 2005 17:17:56 +0000 |
| Subject: | #34103 [Asn->Csd]: line numbering not maintained in dom document | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-83605@lists.php.net to get a copy of this message | ||
ID: 34103
Updated by: rrichards@php.net
Reported By: upstaked at yahoo dot com
-Status: Assigned
+Status: Closed
Bug Type: DOM XML related
Operating System: *
PHP Version: 5CVS-2005-08-12
Assigned To: chregu
New Comment:
This bug has been fixed in CVS.
Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
Thank you for the report, and for helping us make PHP better.
Previous Comments:
------------------------------------------------------------------------
[2005-08-13 14:26:50] upstaked at yahoo dot com
Fixed with a quick hack:
Added in ext/dom/document.c under
static xmlDocPtr dom_document_parser(), line 1515
#endif
+ ctxt->linenumbers = 1;
ctxt->recovery = recover;
So I'll move this to DOM, and wait for some sort of a writable
DomDocument::$maintainLineNumbers that's properly coded.
------------------------------------------------------------------------
[2005-08-13 03:09:43] upstaked at yahoo dot com
If my debugging so far might be of any help:
Tracking down the implementation in libexslt,
http://cvs.gnome.org/viewcvs/libxslt/libexslt/saxon.c?r1=1.6&r2=1.7
in command line this requires(required) -l.
It used to work like this in xsltproc, but now it's implemented by
default:
http://cvs.gnome.org/viewcvs/libxslt/xsltproc/xsltproc.c?r1=1.2&r2=1.3
doing xmlLineNumbersDefault(1);
This is trackable right down to libxml2, in parserInternals.c, that
sets ctxt->linenumbers = xmlLineNumbersDefaultValue and the actual
value being set in SAX2.c: if (ctxt->linenumbers) { ... ret->line =
(short) ctxt->input->line; ... }
Given my limited C skills, this is all I could find out. I guess it
might actually be an issue in the dom extension.
------------------------------------------------------------------------
[2005-08-12 22:38:07] sniper@php.net
Christian, check it out please. (I can reproduce too)
------------------------------------------------------------------------
[2005-08-12 19:44:42] upstaked at yahoo dot com
It doesn't work; it's not fixed in latest, as of this time.
------------------------------------------------------------------------
[2005-08-12 17:05:02] sniper@php.net
Please try using this CVS snapshot:
http://snaps.php.net/php5-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php5-win32-latest.zip
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/34103
--
Edit this bug report at http://bugs.php.net/?id=34103&edit=1