[prev in list] [next in list] [prev in thread] [next in thread] 

List:       xerces-j-user
Subject:    Re: Problem reading newline characters and rewriting them
From:       Aleksander Slominski <aslom () cs ! indiana ! edu>
Date:       2005-07-12 21:30:50
Message-ID: 42D4368A.60905 () cs ! indiana ! edu
[Download RAW message or body]

Antonio Ruiz Martínez wrote:

>Hello!
>
>Thanks for your answer.
>The problem is that I need to preserve the newlines because part of the
>document is signed, and if the parser transforms the newlines, then the
>signature is not valid because I'm not using xml signature, I'm using CMS
>signature.
>
>Is there any way to preserve them?
>  
>
Antonio,

you would need to intercept input stream before parser reads it and 
extract your XML from it or use a parser that allows lower level access 
to XML verbatim string content (for example XPP3/XmlPull)

>Please, could you help me?
>  
>
i think the better solution is to not require anything above what is in 
XML spec. there is another way to make this work with any XML parser:  
we have used BASE64 to encode part of XML that is signed (replacing 
signed XML with BASE64 encoded string representation of XML) - that 
protects it during transport - and when message is received we decode 
BASE64, verify signature, and inject XML decoded from BASE64 back into 
XML stream.

HTH,

alek

>Regards,
>Antonio
>
>-----Mensaje original-----
>De: Joseph Kesselman [mailto:keshlam@us.ibm.com] 
>Enviado el: martes, 12 de julio de 2005 22:26
>Para: j-users@xerces.apache.org
>Asunto: Re: Problem reading newline characters and rewriting them
>
>Per the XML Recommendation, XML parsers normalize all newline sequences
>into the XML newline character. There's no information retained about which
>version of newline was read in.
>
>______________________________________
>Joe Kesselman, IBM Next-Generation Web Technologies: XML, XSL and more.
>"The world changed profoundly and unpredictably the day Tim Berners Lee
>got bitten by a radioactive spider." -- Rafe Culpin, in r.m.filk
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: j-users-unsubscribe@xerces.apache.org
>For additional commands, e-mail: j-users-help@xerces.apache.org
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: j-users-unsubscribe@xerces.apache.org
>For additional commands, e-mail: j-users-help@xerces.apache.org
>
>  
>


-- 
The best way to predict the future is to invent it - Alan Kay


---------------------------------------------------------------------
To unsubscribe, e-mail: j-users-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-users-help@xerces.apache.org

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic