OpenSAML and Apache Santuario (xmlsec) 1.5.1

Brent Putman putmanb at georgetown.edu
Sat Apr 14 04:09:23 BST 2012



On 4/13/12 6:09 PM, Brent Putman wrote:
>
> I just did a simple test using the DOM API.  Turns out, attribute
> ID-ness does not persist across adopting the Element into a new
> Document. Or at least, Document getElementById does not work on the new
> Document after adoption.  That's a bit surprising to me, I don't know if
> that is a bug in Xerces or the intended behavior.


Looks like it's not a bug:

https://issues.apache.org/jira/browse/XERCESJ-1022

See in particular the email thread at the end.

Quoting one poster from the thread:

> (Speaking as one of the folks on the DOM WG at the time import and adopt
> were being debated: Yes, we explicitly decided that retaining ID-ness was
> not desirable, for essentially the same reasons that have been discussed
> here.)


That's from Jan 2007, but I can't find anything newer, so this sounds
like it was the last word.

Apparently the workaround and intended way of usage is:  associate a
schema with the document and then use Document#normalizeDocument(),
which will reestablish ID-ness.  So that doesn't really help much unless
you do schema validation.

--Brent

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://shibboleth.net/pipermail/dev/attachments/20120413/20987c1c/attachment.html 


More information about the dev mailing list