[xmlsec] Microsoft .NET compatibility

Aleksey Sanin aleksey at aleksey.com
Sat May 10 10:40:16 PDT 2003


You are right. This is exactly what LibXML2 does. However, C14N spec 
says that :

    http://www.w3.org/TR/2001/REC-xml-c14n-20010315#Terminology

    -  All whitespace in character content is retained (excluding 
characters removed during
    line feed normalization)  
   
    http://www.w3.org/TR/2001/REC-xml-c14n-20010315#DataModel

    If an XML document must be converted to a node-set, XPath REQUIRES that
    an XML processor be used to create the nodes of its data model to 
fully represent
    the document. The XML processor performs the following tasks in order:

   1. normalize line feeds
   2. ...

And unless I misunterstood something, this means that \r characters MUST 
be removed
during C14N. LibXML2 does not do this. It inserts &#D; and later 
conoverts all entities back
including &#D; --> '\r'. Which means that on c14n level I just don't see 
difference between '\r'
that came from \r->&#D;->\r and '\r' that came from &#D;->\r. I need to 
kill the first ones and
save the second ones. And as I said, fixing LibXML2 parser might be tricky.

I wrote only on c14n implementation but I hate c14n code. It just too 
complicated with too many
corner cases.

Aleksey


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.aleksey.com/pipermail/xmlsec/attachments/20030510/9a19ffd9/attachment.htm


More information about the xmlsec mailing list