Hi Frank, Unfortunately, one of the child elements/DataObjects of the DataObject I'm saving has a form="unqualified". So, it needs to be serialized with a 'xmlns=""' which didn't happen. I guess this is a scoping issue with the XMLNSPrefixMap that probably cannot be easily solved, right? Do you think my best bet is to convert my DataObject to a DOM Document, set a default namespace and remove the prefix namespace on the document element, then recursively navigate through the elements and rename those within that "default namespace" to remove their prefix? Any other ideas? - Ron
----- Original Message ---- From: Frank Budinsky <[EMAIL PROTECTED]> To: [email protected] Sent: Thursday, July 6, 2006 6:51:55 PM Subject: Re: XMLHelper.save() specifying default namespace of root element Ron, EMF lets you control the xmlns prefixes by setting the XMLNSPrefixMap of the DocumentRoot, but SDO has no concept of DocumentRoot so it's hidden in the implementation. To support this in Tuscany, a line of code like this is needed in the XMLDocumentImpl ctor: ((EMap)documentRoot.eGet(extendedMetaData.getXMLNSPrefixMapFeature(documentRootClass))).put("", rootElementURI); It may be possible to add an option in the Tuscany implementation of the XMLHelper.save() method to do this. How important is it to you? Does anybody else think this sounds like a good feature to add? Note that you need to be a little bit careful when using the default namespace if your schema declares qualified form elements, for example. Frank. Ron Gavlin <[EMAIL PROTECTED]> wrote on 07/06/2006 12:49:22 PM: > When I invoke XMLHelper.INSTANCE.save(), I would like the ability to > make the namespace I specify for the root element the default > namespace for the resulting document. Currently, a namespace and > prefix are defined for the root element and all nodes from that > namespace are specified using that prefix. Is there any way to > trigger use of a default namespace to accomplish this? > > Also, I noticed that Jeremy has a class DOMHelperImpl in his sandbox > that looks like it can be used to efficiently load/save DataObjects > from/to DOM nodes. This looks like a useful utility class. Any plans > to formally support this type of functionality in Tuscany SDO? > > - Ron > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
