Re: Associating XForms specific restrictions for RTE use

Michael Kay <[email protected]>
Newsgroups gmane.text.xml.schema.devel
Message-ID <[email protected]>
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
>
>
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.