HTML5 and XML

Are you missing a feature? Request its implementation here.
rleif
Posts: 7
Joined: Sun Nov 29, 2009 8:03 am

HTML5 and XML

Post by rleif »

Since oXygen supports both HTML5 and XML, it would be very useful if the two modalities could be used together. For instance, if I create a form with HTML5 and wish to write or read an element that is based on an XML simple type. How do I do it?
george
Site Admin
Posts: 2095
Joined: Thu Jan 09, 2003 2:58 pm

Re: HTML5 and XML

Post by george »

Hi,

oXygen does not support HTML5 yet, we support XHTML5. For XHTML5 we provide content completion and validation.
I am not sure I understand your question. My impression is that you want XForms.

Best Regards,
George
George Cristian Bina
rleif
Posts: 7
Joined: Sun Nov 29, 2009 8:03 am

Re: HTML5 and XML

Post by rleif »

I actually prefer XHTML5 and will correct my question. How does one have XHTML5 interact with XML elements? I do not want XForms because the presence of forms in HTML5 has made XForms obsolete.
There are two levels of XML interacting with XHTML5. The first is to make the XHTML5 and the XML element invisible to each other. This would permit XML elements to be encapsulated in XHTML5 pages by XHTML5 markup elements e.g. <p>text <XML_Element>Element_Value</XML_Element> text</p>
On the XML side, this can be done in xsd1.1 by something like
<xs:openContent mode="interleave">
<xs:any namespace="http://namespace_xhtml5" processContents="strict"/>
</xs:openContent>
Is there an equivalent of openContent in XHTML5?
The other application is using an xml element in an XHTML5 form.
george
Site Admin
Posts: 2095
Joined: Thu Jan 09, 2003 2:58 pm

Re: HTML5 and XML

Post by george »

You can use wildcard patterns also in Relax NG, this is present in almost any Relax NG schema that allows foreign content.
Alternatively you can use NVDL to extract the XHTML part of the document and direct that to the XHTML schema while for content in other namespaces you can either accept that whatever it is or match a specific namespace and validate that with a specific schema for that namespace. In the oXygen sample project I included an NVDL script for XHTML with embedded XForms content and the XHTML part is extracted and validated with the XHTML schema while the XForm content is validated with a different schema. If you do not want to validate the foreign content then you can use the NVDL accept action instead of validate.

Best Regards,
George
George Cristian Bina
Post Reply