I have slightly changed the solution for this, so that to avoid a dependency between scalaxb.scala and protocol.scala. Now the function to handle non-default cases is passed by the means of implicits rather than the direct access to the protocol.
From my previous PR:
Consider the following snippet from dml-main.xsd, which is a part of OpenOffice schemata:
<xsd:any minOccurs="0" maxOccurs="unbounded" processContents="strict"/>
<xsd:attribute name="uri" type="xsd:token" use="required"/>
In a pptx presentation slide, a XML tree that represents a table goes in place of xsd:any, for example:
a:graphicData is CT_GraphicalObjectData.
Apparently, not only the CT_Table can be used there, hence xsd:any, but often the CT_Table, or a:tbl is of interest.
The problem is, ScalaXB stores xsd:any as bare scala.xml.Elem, wrapped into scalaxb.DataRecord[Any]. Perhaps this is because xsd:any doesn't carry any type information, so ScalaXB doesn't know what to bind the element to.
However, there is a way to know for sure that <a:tbl> is a CT_Table, since it is declared in the schema:
<xsd:element name="tbl" type="CT_Table"/>
Tests for xsd:any resolution
List of topmost element declarations is generated in the protocol
xsd:any is resolved correctly, test passes
Merge branch 'master' into xsd-any-resolution