From: "Dennis Sosnoski" <[EMAIL PROTECTED]> > I hadn't considered the extra instance data issue - looking at the code > I see you've avoided storing a reference to the document and instead > just walk up the tree on a getDocument() call. > > But the QName *does* store a reference to the documentFactory. How is > that intended to work? It seems like it'd cause problems if the same > QNames are used with different documentFactories.
This feature allows different named Element/Attributes to have different factories. e.g. JAXM uses this feature to create different Element implementations for a SOAP Envelope, Header and Body. Similarly the datatypes support uses this feature to create type-aware (int, date, float etc) Element and Attributes based on the 'type' in the schema. So if the QName has a DocumentFactory then the getDocument() method on Element/Attribute should return it, otherwise return the document's DocumentFactory - is probably a good algorithm for now. James _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com _______________________________________________ dom4j-dev mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/dom4j-dev