[xml] libxml2, xpointer and incorrect ID names



Good evening respected professionals!

I'm working with libxml2-2.5.10 (win32). More exactly, I'm working
with xmlsec-1.1.2, and this library in one's turn is working with
libxml2. I have a necessity to verify a signature of XML-document. But
I can't do that because I'm receiving documents of such kind:   

<!DOCTYPE MyMessage [ <!ATTLIST MyTag id ID #REQUIRED > ]>

<MyMessage>
  <MyTag id="12345">
  ...
  </MyTag>
</MyMessage>

And further I have a reference:

<Reference URI="#12345">...</Reference>

In other words, I have an element indefinier containing only numeric
symbols. I know that it is not allowed by standard. I think, that's
why libxml2 generates an error:

Use of deprecated SAXv1 function ignorableWhitespace
func=:file=..\src\xpath.c:line=281:obj=unknown:subj=xmlXPtrEval:error=5:libxml2 library function 
failed:expr=xpointer(id('12345'))

If I'm adding a first letter into attribute "id", libxml2 processes
XML successfully (but, of course, digest in that case does not match). 
Please, advice me, what can I do? How can I make libxml2 correctly
processing such documents?

Please, duplicate your answers to address sk1978 mail333 com
Thank you.

-- 
Best regards,
 Slava




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]