unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Ramesh Nedunchezian <rameshnedunchezian@outlook.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 59537@debbugs.gnu.org
Subject: bug#59537: `libxml-parse-xml-region` strips out the namespace information, and namespace prefix in the DOM representation
Date: Thu, 24 Nov 2022 16:21:30 +0530	[thread overview]
Message-ID: <TY2PR0101MB3693E0E264287F641FACAC61DA0F9@TY2PR0101MB3693.apcprd01.prod.exchangelabs.com> (raw)
In-Reply-To: <83wn7kwt0q.fsf@gnu.org>

On 24/11/22 15:52, Eli Zaretskii wrote:
>> Date: Thu, 24 Nov 2022 14:31:52 +0530
>> From: Ramesh Nedunchezian <rameshnedunchezian@outlook.com>
>>
>> `libxml-parse-xml-region` strips out the namespace information, and namespace prefix in the DOM representation.
>>
>> Stripping out the NAMESPACE information is a bug.
> AFAICT, we just call a function from libxml2.  So I guess the bug is in that
> library?

Do I need to upgrade? 

I am on a  Debian Unstable, and my laptop was updated only 3-months ago.  I would think that for all practical purposes, my libraries are "recent".

I am not familiar with XML or XML libraries much. 

May be Emacs should provide other entry points to libxml which would  preserve (or return) the namespace information ..

The problem with current state of affairs is that round tripping wouldn't work.  That is if I move from XML1->DOM->XML2, XML1 and XML2 will no longer be the same.

I believe, libxml was introduced to cater to Eww's HTML rendering.  So, would it be "reasonable" to say that the current entry point is sufficient to work with HTML-like XML, and not for ANY XML.


I am on debian unstable


$ uname -a

Linux debian 5.19.0-1-amd64 #1 SMP PREEMPT_DYNAMIC Debian 5.19.6-1 (2022-09-01) x86_64 GNU/Linux

~$ ldd `which emacs` | grep xml

    libxml2.so.2 => /lib/x86_64-linux-gnu/libxml2.so.2 (0x00007f5a62052000)


~$ ls -al /lib/x86_64-linux-gnu/libxml2.so.2
lrwxrwxrwx 1 root root 17 Jul 24 01:33 /lib/x86_64-linux-gnu/libxml2.so.2 -> libxml2.so.2.9.14

~$ dpkg -S libxml2.so.2.9.14

libxml2:amd64: /usr/lib/x86_64-linux-gnu/libxml2.so.2.9.14

~$ apt show libxml2:amd64

Package: libxml2
Version: 2.9.14+dfsg-1+b1
Priority: optional
Section: libs
Source: libxml2 (2.9.14+dfsg-1)
Maintainer: Debian XML/SGML Group <debian-xml-sgml-pkgs@lists.alioth.debian.org>
Installed-Size: 1,938 kB
Depends: libc6 (>= 2.33), libicu71 (>= 71.1-1~), liblzma5 (>= 5.1.1alpha+20120614), zlib1g (>= 1:1.2.3.3)
Conflicts: w3c-dtd-xhtml
Homepage: http://xmlsoft.org
Tag: role::shared-lib
Download-Size: 708 kB
APT-Manual-Installed: no
APT-Sources: https://deb.debian.org/debian unstable/main amd64 Packages
Description: GNOME XML library
 XML is a metalanguage to let you design your own markup language.
 A regular markup language defines a way to describe information in
 a certain class of documents (eg HTML). XML lets you define your
 own customized markup languages for many classes of document. It
 can do this because it's written in SGML, the international standard
 metalanguage for markup languages.
 .
 This package provides a library providing an extensive API to handle
 such XML data files.







  reply	other threads:[~2022-11-24 10:51 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-24  9:01 bug#59537: `libxml-parse-xml-region` strips out the namespace information, and namespace prefix in the DOM representation Ramesh Nedunchezian
2022-11-24 10:23 ` Eli Zaretskii
2022-11-24 10:51   ` Ramesh Nedunchezian [this message]
2022-11-24 11:00     ` Eli Zaretskii
2022-12-03  0:58       ` Stefan Kangas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=TY2PR0101MB3693E0E264287F641FACAC61DA0F9@TY2PR0101MB3693.apcprd01.prod.exchangelabs.com \
    --to=rameshnedunchezian@outlook.com \
    --cc=59537@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).