For Datamapper we have to give an option to do data mapping starting from
xml payload (that user may already have). For this we need to to create
avro schema from xml instance. Possible approaches may be
  1. Generate xml schema(XSD) from xml and then create avro schema from XSD.
  2. Directly generate  avro schema by looking at xml (we have to code from
the scratch)

I believe that going with option 1 would be good, so that we can handle the
use case of mapping from xml-schema. Also there are some libraries[1] and
online tools[2,3] available to generate XSD from xml with some limitations.
(eg represent leaf values as strings). Also from bit of research i found
that there are several types of XSD representation (Venetian Blind Design,
Russian Doll Design, Salami Slice Design) and we may need to decide on
which would best fit (or easy to convert to) avro schema.
If someone has done similar xml<->XSD conversion, please share your ideas
and suggestions.

Thanks


[1] http://xmlbeans.apache.org/docs/2.0.0/guide/tools.html#xsd2inst

[2] https://devutilsonline.com/xsd-xml/generate-xsd-from-xml

[3]http://www.freeformatter.com/xsd-generator.html



-- 
*Susinda Perera*
Software Engineer
B.Sc.(Eng), M.Sc(Computer Science), AMIE(SL)
Mobile:(+94)716049075
Blog: susinda.blogspot.com
WSO2 Inc. http://wso2.com/
Tel : 94 11 214 5345 Fax :94 11 2145300
_______________________________________________
Architecture mailing list
Architecture@wso2.org
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture

Reply via email to