|[Xtend] How to create and populate an XMLFeatureMap [message #714037]
||Tue, 09 August 2011 16:34
| Peter Keller
Registered: October 2009
I have been using Xtend's XSD adapter for a while now to generate XML schemata, but now for the first time I need to generate a | element. This apparently simple task has got me completely stuck. Can anyone help?
I have used the debugger to examine what happens when I do the reverse operation, that is reading in an XSD that contains a documentation element, and the results are shown in the attached screenshot. It seems to me that I would need to write a Java extension that creates and populates an XMLFeatureMap and adds it to a documentation element something like this:
create xmlschema::DocumentationType this newDocumentation( String text ):
this.setMixed( newXMLFeatureMap(text) );
newXMLFeatureMap( String text ):
JAVA some.package.Helper.createXMLFeatureMap( java.lang.String )
I have spent some time looking through the source code of org.eclipse.xtend.typesystem.xsd without managing to work out how to set about writing a Java extension to do this, but it looks like it should be possible. I seem to be missing factory methods for creating instances of org.eclipse.xtend.typesystem.xsd.type.XMLFeatureMapTypeImpl. Can anyone point me to some more information about how to set about this, or perhaps suggest an alternative approach?
[Updated on: Tue, 09 August 2011 16:35]
Report message to a moderator
Powered by FUDForum
. Page generated in 0.01723 seconds