W3C home > Mailing lists > Public > xmlschema-dev@w3.org > October 2011

Associating XForms specific restrictions for RTE use

From: Alain Couthures <alain.couthures@agencexml.com>
Date: Thu, 27 Oct 2011 09:37:45 +0200
Message-ID: <4EA90A49.6050505@agencexml.com>
To: xmlschema-dev@w3.org
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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 27 October 2011 07:38:17 GMT