I tried to cook things up to produce a style of XML that some javascript
I have is accustomed to.

Basically, the goal is to specify a map of prefixes for namespace URI's,
and put them all out at the top of the message, and then have all
elements have prefixes and no xmlns attributes.

Clearly, this entire enchilada is beyond my understanding. I got partway
there, however, and I think that perhaps the implementors might be
amused by how.

I attach a small family of classes that accomplishes something like what
I was looking for: in Aegis, if the <mapping> element looks like:

<mapping name="btrnm:Name">

Then the default for each element inside is to use the prefix.

I didn't figure out how to squash the (now redundant) xmlns attribute on
each property element.

Anyway, it seems to me that some minor changes in the XMLBeanTypeInfo
and XMLTypeCreator classes would have allowed me to avoid having to
create my own type mapping registry class. I submit that there could be
some notion of a creator factory in the DefaultTypeMappingRegistry, so I
could just supply that factory instead of having to replace the class.

Share and enjoy, assuming that this list tolerates attachments.


Attachment: TypeMappingRegistryForXMLWithNamespacePrefixes.java
Description: TypeMappingRegistryForXMLWithNamespacePrefixes.java

Attachment: XMLBeanTypeInfoWithNamespacePrefix.java
Description: XMLBeanTypeInfoWithNamespacePrefix.java

Attachment: XMLTypeCreatorWithNamespacePrefix.java
Description: XMLTypeCreatorWithNamespacePrefix.java

---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email

Reply via email to