Associating XForms specific restrictions for RTE use

Hello,

I'm implementing an extension in my XForms implementation for allowing a 
rich text editor to be used for editing a text content.

On a first approach, it can be considered that a mime-type value could 
be used just to say that it's HTML content, for example. But there might 
be restrictions on elements depending on different contents to be 
edited: such pseudo-schemas are defined in the RTE configurations.

Because XForms is based on an MVC architecture, my intent is to, first, 
associate a specific type to concerned elements or attributes, then, 
automatically activate adequately an RTE for each. The type definition 
should permit to declare an id of the corresponding pseudo-schema, like 
this :

<xsd:schema targetNamespace="http://www.agencexml.com/xsltforms">
<xsd:simpleType name="standardHTML">
<xsd:restriction base="xsd:string" xsltforms:rte="standardHTMLrte"/>
</xsd:simpleType>
</xsd:schema>

This could also be more detailed using the annotation element, like this:

<xsd:schema targetNamespace="http://www.agencexml.com/xsltforms">
<xsd:simpleType name="standardHTML">
<xsd:restriction base="xsd:string" xsltforms:rte="standardHTMLrte"/>
<xsd:annotation>
<xsd:appinfo>
                 ... specific RTE configuration here ...
</xsd:appinfo>
</xsd:annotation>
</xsd:simpleType>
</xsd:schema>

Is it a valid use of XML Schema? Do you have suggestions?

Thanks!

Alain Couthures
agenceXML

Received on Thursday, 27 October 2011 07:38:16 UTC