xml-xmlbeans-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Waite <m...@akuma.org>
Subject Re: xmlbeans xml security
Date Sat, 03 Jul 2004 05:28:52 GMT
On Jul 2, 2004, at 10:47 PM, Eric Vasilik wrote:

> I would recommend writing the c14n serialization using XmlCursor.  One
> can navigate to the XmlObject for an element and interrogate the Schema
> type, looking for default attributes, for example, and including them 
> in
> the serialization.  This assumes that the instance is valid with 
> respect
> to the schema.  Does c14n require that the instance is schema valid?

Nope. I actually didn't realize they had the attribute DTD-type stuff 
in there at all until this thread started :)

> Also, it seems that the handling of namespaces is significantly
> different for c14n than the current saver handles them.

Could you elaborate?

> You will have total control over the serialization this way and, the
> c14n serialization can be written as a utility on XmlBeans as opposed 
> to
> being in XmlBeans.  The XmlCursor interface is meant to enable high
> performance access to the store.
> Also, there are two other alternatives to using XmlCursor.  In the v2
> codebase, there is a low-level cursor access to the store which you
> could use, but the c14n implementation would then become an internal
> feature of XmlBeans.   This approach would probably yield the highest
> performance c14n implementation.

By internal, do you mean a bundled feature? Or just coupled more 
tightly to a particular release of XMLBeans?

> The other approach would be to use the implementation of the live DOM 
> on
> the v2 store.  Is there an open source implementation of c14n which is
> implemented on top of a DOM?  Could we use it instead of doing it 
> again?

Yes, but the current implementation for using the DOM for C14N within 
XML Security would not be nearly as efficient as doing it ourselves. It 
also has a workaround for Xalan's lack of support for the namespace 
axis, where it copies all namespaces in scope onto every element - it 
modifies the original document in the process of creating the canonical 

-David Waite

- ---------------------------------------------------------------------
To unsubscribe, e-mail:   xmlbeans-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xmlbeans-dev-help@xml.apache.org
Apache XMLBeans Project -- URL: http://xml.apache.org/xmlbeans/

View raw message