Re: [xml] XPointer problem
- From: Aleksey Sanin <aleksey aleksey com>
- To: veillard redhat com
- Cc: xml gnome org
- Subject: Re: [xml] XPointer problem
- Date: Wed, 21 Aug 2002 15:36:02 -0700
Thanks for checking! Then something is wrong with my code or my understanding
:(
Aleksey
Daniel Veillard wrote:
Hehe, no you're wrong. Check the regression tests:
test/XPath/xptr/chaptersparts:
xpointer(//chapitre[2])xpointer(//chapter[2])
and
xpointer(id("chapter1"))xpointer(//*[ id="chapter1"])
and
result/XPath/xptr/chaptersparts:
========================
_expression_: xpointer(//chapitre[2])xpointer(//chapter[2])
Object is a Node Set :
Set contains 1 nodes:
1 ELEMENT chapter
ATTRIBUTE id
TEXT
content=chapter2
========================
_expression_: xpointer(id("chapter1"))xpointer(//*[ id="chapter1"])
Object is a Node Set :
Set contains 1 nodes:
1 ELEMENT chapter
ATTRIBUTE id
TEXT
content=chapter1
Look at testXPath.c support for the --xptr flag1, it's there !
Note however that I didn't updated to the changes made in the very lastr
set of drafts, if any...
Daniel
On Wed, Aug 21, 2002 at 01:08:40PM -0700, Aleksey Sanin wrote:
No reply in a week so I am reposting the message. Daniel, can your
confirm that my understanding is correct and there is a buf in LibXML
imlementation?
Hi, Daniel!
I am not sure but it looks like I found a small problem with XPointer
implementation in LibXML: it looks like LibXML does not support
multiple "xpointer()" parts as it is described in [1].
It'll be great if you can take a look at this because I've looked at the
xpointer.c (functions: xmlXPtrEval and xmlXPtrEvalXPointer) and it
does not seem like there exists a quick and simple fix.
Thank you in advance,
Aleksey.
[1] http://www.w3.org/TR/2001/CR-xptr-20010911/#schemes
-----
However, in the absence of the DTD, it is not typically possible to
determine
if an attribute is of type ID. An XPointer like the following, with
two parts,
will have its first part fail if no DTD is available, but will have
its second part
succeed if the desired attribute's name is id; note that the intent of
the second
XPointer part is just an approximation of the first.
xpointer(id("chap1"))xpointer(//*[ id="chap1"])
_______________________________________________
xml mailing list, project page http://xmlsoft.org/
xml gnome org
http://mail.gnome.org/mailman/listinfo/xml
_______________________________________________
xml mailing list, project page http://xmlsoft.org/
xml gnome org
http://mail.gnome.org/mailman/listinfo/xml
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]