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

Re: Associating XForms specific restrictions for RTE use

From: Michael Kay <mike@saxonica.com>
Date: Thu, 27 Oct 2011 08:59:44 +0100
Message-ID: <4EA90F70.60608@saxonica.com>
To: xmlschema-dev@w3.org
As far as I can see, both seem perfectly reasonable uses of the 
extensibility points provided in XSD.

Michael Kay
Saxonica

On 27/10/2011 08:37, Alain Couthures wrote:
> 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 08:00:09 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 27 October 2011 08:00:09 GMT