Re: serialization and xml wrapping

Good point, I *think* the example is in error -- perhaps we didn't updated 
it after Merlin added the 'emmit xmlns="" rule'; we should probably only 
emit xmlns="" when there's no namespace node, but I want to think about it 
more and see what Merlin says.

On Friday 20 September 2002 04:46 pm, Ari Kermaier wrote:
> Dear All,
>
> I'm confused about the rules for augmenting/wrapping/parsing decrypted
> XML in XML Encryption and Decryption Transform. Given the example from
> [1]:
>
> <!DOCTYPE Document [
>   <!ENTITY dsig "http://www.w3.org/2000/09/xmldsig#">
> ]>
> <Document xmlns="http://example.org/">
>   <foo:Body xmlns:foo="http://example.org/foo">
>     <EncryptedData xmlns="http://www.w3.org/2001/04/xmlenc#"
>                    Type="http://www.w3.org/2001/04/xmlenc#Element">
>       ...
>     </EncryptedData>
>   </foo:Body>
> </Document>
>
> Where the EncryptedData element decrypts to:
>
> <One><foo:Two/></One>
>
> The text gives the following as the correct result:
>
> <!DOCTYPE dummy [
>   <!ENTITY dsig "http://www.w3.org/2000/09/xmldsig#">
> ]>
> <dummy xmlns="http://example.org/"
>        xmlns:foo="http://example.org/foo"><One><foo:Two/></One></dummy>
>
> However, [2] indicates that <Foo/> parsed in the context of:
>
> <Bar xmlns="http://example.org/bar"/>
>
> Should be augmented to produce:
>
> <Bar xmlns="http://example.org/bar"><Foo xmlns="" /></Bar>
>
> Wouldn't this mean that the example from [1] should give the result as:
>
> <!DOCTYPE dummy [
>   <!ENTITY dsig "http://www.w3.org/2000/09/xmldsig#">
> ]>
> <dummy xmlns="http://example.org/"
>        xmlns:foo="http://example.org/foo"><One
> xmlns=""><foo:Two/></One></dummy>
>
> But this doesn't make sense to me, since the point of giving the parsing
> context to the dummy element is to make sure that inherited namespaces
> *are* transmitted to the wrapped XML.
>
> Further: [3] indicates, for Step 2 of  decryptXML(N, E), that: "A
> namespace declaration xmlns="" MUST be emitted with every apex element
> that has no namespace prefix and URI as described in Serializing XML
> [XML-Encryption, section 4.3.3]". Firstly, we're talking about the apex
> elements in a node-set, which might include namespace nodes for the
> default namespace inherited from the dummy element in prior
> wrapping/parsing -- this means that an element without a namespace prefix
> is not necessarily without a namespace, and emitting xmlns="" would
> conflict with emission of the namespace node in the node-set.
>
> What am I missing?
>
> Thanks,
> Ari Kermaier
>
> -----------------
> [1]  http://www.w3.org/TR/xmlenc-core/#sec-Text-Wrapping
> [2]  http://www.w3.org/TR/xmlenc-core/#sec-Serializing-XML
> [3]
> http://www.w3.org/Encryption/2001/Drafts/xmlenc-decrypt.html#sec-xml-proc
>ess ing

-- 
Joseph Reagle Jr.                 http://www.w3.org/People/Reagle/
W3C Policy Analyst                mailto:reagle@w3.org
IETF/W3C XML-Signature Co-Chair   http://www.w3.org/Signature/
W3C XML Encryption Chair          http://www.w3.org/Encryption/2001/

Received on Monday, 23 September 2002 13:10:26 UTC