So far I have been able to generate classes and de-serialize many of the patient*.xml samples provided to both raw classes generated as described, and classes generated from the raw classes by a SOAP service.
Editing xhtml1-strict.xsd to fix this issue is not that simple. I used xsd.exe to attempt to create classes from the file, then used the error messages as starting points. After some experimentation, I cam up with this file. It addresses the problem with the div element, as long the HTML contained is kept simple. I am sharing the difference report for others to make use of. The numbers represent line-number. (I am just sharing the changes because of size limitations, I tried to share the whole file).
XSD\xhtml1-strict.xsd(413): <!--<xs:group ref="inline"/>-->
XSD\xhtml1-strict.xsd(441): <!--<xs:element ref="pre"/>-->
XSD\xhtml1-strict.xsd(443): <!--<xs:element ref="blockquote"/>-->
XSD\xhtml1-strict.xsd(462): <!--<xs:group ref="misc"/>-->
XSD\xhtml1-strict.xsd(519): <!--<xs:group ref="block"/>-->
XSD\xhtml1-strict.xsd(520): <!--<xs:group ref="misc"/>-->
XSD\xhtml1-strict.xsd(539): <!--<xs:group ref="misc"/>-->
XSD\xhtml1-strict.xsd(1349): <!--<xs:group ref="block"/>-->
XSD\xhtml1-strict.xsd(1351): <!--<xs:group ref="inline"/>-->
XSD\xhtml1-strict.xsd(1352): <!--<xs:group ref="misc"/>-->
XSD\xhtml1-strict.xsd(1450): <!--<xs:group ref="block"/>-->
XSD\xhtml1-strict.xsd(1452): <!--<xs:group ref="misc"/>-->
XSD\xhtml1-strict.xsd(1718): <!--<xs:group ref="block"/>-->
XSD\xhtml1-strict.xsd(1720): <!--<xs:group ref="inline"/>-->
XSD\xhtml1-strict.xsd(1721): <!--<xs:group ref="misc"/>-->
I am also sharing my notes so far regarding manual edits required, to fix issues in the classes generated.
Generate entities with Xsd2Code add-in from www.codeplex.com\Xsd2Code
Use fhir-atom-single.xsd as the source XSD
Use Parms:
Serilization.GenerateXMLAttributes = true
Code.Namespace = Hl7.Fhir.Validation.SchematronOutput
Collection.CollectionObjectType=Array
!!! Do not open Schema in Designer, or classes will change.
Manual updates:
public partial class boolean : Element
...
[System.Xml.Serialization.XmlAttributeAttribute("value")]
public bool Value
{
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = false, Namespace = "http://www.w3.org/1999/xhtml")]
public partial class div : Flow
Refactor:
public partial class FeedType
to
public partial class feed