[xml/sgml-pkgs] Bug#530922: libxml2: buggy range() XPointer function

Jakub Wilk ubanus at users.sf.net
Thu May 28 19:30:44 UTC 2009


Package: libxml2
Version: 2.7.3.dfsg-1
Severity: normal

range() XPointer function[1] returns wrong locations:

$ ./test-xpointer '<r>1<a>2</a>3<b/></r>' 'range(//a)'
<?xml version="1.0"?>
<root><r xml:base="/tmp/tmp.XXXXgAmOW2">1</r></root>

$ ./test-xpointer '<r>1<a>2</a>3<b/></r>' 'range(//b)'
<?xml version="1.0"?>
<root><r xml:base="/tmp/tmp.XXXXJUZujm"><a/></r></root>


[1] http://www.w3.org/TR/xptr-xpointer/#dt-covering-range

-- System Information:
Debian Release: squeeze/sid
   APT prefers unstable
   APT policy: (900, 'unstable'), (500, 'experimental')
Architecture: i386 (i686)

Kernel: Linux 2.6.29-2-686 (SMP w/2 CPU cores)
Locale: LANG=C, LC_CTYPE=pl_PL.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages libxml2 depends on:
ii  libc6                  2.9-13            GNU C Library: Shared libraries
ii  zlib1g                 1:1.2.3.3.dfsg-13 compression library - runtime

Versions of packages libxml2 recommends:
ii  xml-core                      0.12       XML infrastructure and XML catalog

libxml2 suggests no packages.

-- no debconf information

-- 
Jakub Wilk
-------------- next part --------------
#!/bin/sh
if [ $# -ne 2 ]
then
  echo "Usage: $0 <xml> <xpointer>" >&2
  exit 1
fi
xml=$1
xpointer=$2
tmpxml=`mktemp -t` || exit 1
echo "$xml" > "$tmpxml"
cat <<EOF | xmllint --xinclude -
<root>\
<include xmlns="http://www.w3.org/2003/XInclude"
href="$tmpxml" xpointer="xpointer($xpointer)"/>\
</root>
EOF
rm -f "$tmpxml"


More information about the debian-xml-sgml-pkgs mailing list