OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

dss message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]

Subject: RE: [dss] XMLData opaqueness ?


  I am bringing this up because this is exactly what my parser is doing
(with encoding=None) when I build the XML request document. Because I am
building by setting node content, the library (libxml2) knows what is
structure and what is content. When I serialize the parsed object in order
to prepare to send it to the DSS Server, it substitutes the escapes only in
the node containing the XML content.

  My server happily parses the request (with the XML in the XMLData node).
Then again I am using the same library on both sides.

  Rich ... Is escaped HTML valid in a UTF-8 encoded XML document ? Is the
referenced escaping OK ?


-----Original Message-----
From: Juan Carlos Cruellas [mailto:cruellas@ac.upc.edu] 
Sent: April 5, 2005 11:56 AM
To: ed.shallow@rogers.com
Subject: Re: [dss] XMLData opaqueness ?


Your suggestion is to escape all the '<' and '>' so that in plain words,
within <XMLData> there is not xml any more but a String coming from the
serialization of a XML document or subtree where '<' and '>' have been
I have a doubt: are we sure that any parser would be able to correctly undo
the escape operations? I mean, what if within the original XML document
there are '<' or '>' escaped documents as text (ie, as characters of the
text content of certain elements)?
Are we sure that the parser at the receiver will be able to distinguish
which escaped characters will have to unescape?

Juan Carlos.

Edward Shallow wrote:

>   With respect to passing in content inside the XMLData element (on 
>either a Verify or Sign) do you believe it would be legitimate to 
>ensure opaqueness of the content by escaping all the <'s and >'s ?
>   For example replace all < with &lt; and all > with &gt;
>   See attached for an explicit example.
>   In fact my XML library (Gnome libxml2) is doing exactly this when I 
>invoke the serialize() method on the parsed xml tree object.
>   This in fact allows an implementation to support an xml declaration 
>line (i.e. <?xml version="1.0" encoding="UTF-8"?> ) which might be 
>inside the content (and whose encoding may be different from the request's
>ISO-8859-1 or UTF-16) without causing parsing problems.
>   Is anyone else having similar challenges ?
>   Browsers accept this escaped nesting.
><?xml version="1.0"?>
>    <InputDocuments>
>        <Document ID="" RefURI="" RefType="">
>            <Schema></Schema>
>            <XMLData>&lt;?xml version="1.0" encoding="UTF-8"?&gt; 
>        &lt;b&gt;
>                &lt;c&gt;
>                        &lt;c1 MimeType="text/plain"&gt;This is the
>                        &lt;c2 MimeType="text/plain"&gt;This is the
>                        &lt;c3 MimeType="text/plain"&gt;This is the
>                &lt;/c&gt;
>        &lt;/b&gt;
>        &lt;d&gt;
>                &lt;d1 MimeType="text/plain"&gt;This is the data&lt;/d1&gt;
>                &lt;d2 MimeType="text/plain"&gt;This is the data&lt;/d2&gt;
>        &lt;/d&gt;
>        &lt;e&gt;
>                &lt;f&gt;
>                        &lt;f1 MimeType="text/plain"&gt;This is the
>                        &lt;f2 MimeType="text/plain"&gt;This is the
>                        &lt;f3 MimeType="text/plain"&gt;This is the
>                &lt;/f&gt;
>                &lt;Signature
>                        &lt;SignedInfo&gt;
>                                &lt;CanonicalizationMethod
>                                &lt;SignatureMethod
>                                        &lt;Reference URI=""&gt;
>                                                &lt;Transforms&gt;
>                                                        &lt;Transform
>                                                &lt;/Transforms&gt;
>                                                &lt;DigestMethod
>                                        &lt;/Reference&gt;
>                        &lt;/SignedInfo&gt;
>                        &lt;KeyInfo&gt;
>                                &lt;KeyName/&gt;
>                                &lt;X509Data&gt;
>Patrick Shallow,OU=Electronic Post Mark,O=For Test Use  Only,O=Canada 
>Post Corporation,L=Ottawa,ST=Ontario,C=CA&lt;/X509SubjectName&gt;
>ada Post Corporation Certificate Authority,OU=Electr onic Post 
>Mark,O=For Test Use Only,O=Canada Post 
>                        &lt;/KeyInfo&gt;
>                &lt;/Signature&gt;
>        &lt;/e&gt;
>        </Document>
>    </InputDocuments>
>    <NodeName></NodeName>
>To unsubscribe from this mail list, you must leave the OASIS TC that 
>generates this mail.  You may a link to this group and all your TCs in 

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]