Swami Kevala wrote:
> 
> I am using a custom schema for transcribed discourses for which I have
> defined an <onTopic> element which can contain one or more paragraphs. I
> am using this to mark up the places in my document where certain topics
> are discussed. This has a @keywords attribute, which is defined by the
> relax ng list pattern ( i.e. it is a list of space-delimited words that
> describe the topic) E.g.keywords="war death Iraq"
> 
> I want to be able to define some kind of control on my styled view that
> will easily allow the user to add or remove keywords from the list. The
> 'list' control does do this - but I have around 300 keywords available,
> and I don't want a huge listbox appearing - I just prefer a combo box
> that would allow me to make multiple selections. (Would also be great if
> it could be sorted alphabetically)
> 
> Does anybody know if this would be possible to accomplish this. I am
> currently evaluating the professional edition, and I need to know if
> I'll be able to do this.
> 

> I'd also like to know if there is any way  to  create  a custom css control 
> using the java api which would retrieve the list of strings directly from my 
> relax schema, instead of having to duplicate them in the css definition


--> Creating a custom control, embded in the styled view, that may be
used to add/remove keywords to/from an attribute is not difficult. See
http://www.xmlmind.com/xmleditor/_distrib/doc/dev/styleext.html#solution4

--> There is no way to get any information from your RELAX NG schema
because we don't have an API (public or private) for that. Grammars such
as DTD, W3C XML Schema and RELAX NG are treated as abstract validation
services. And you cannot ``query'' such validation services. See
http://www.xmlmind.com/xmleditor/_distrib/doc/api/com/xmlmind/xmledit/doctype/DocumentType.html

The idea is to automatically extract the list of possible keywords from
your schema and to make your custom control use this list.

--> You can probably create something *usable* without having to develop
custom Java[tm] code. A command button and a macro should do the trick.

See
http://www.xmlmind.com/xmleditor/_distrib/doc/csssupport/command-button.html

See
http://www.xmlmind.com/xmleditor/_distrib/doc/commands/writing_macros.html

See http://www.xmlmind.com/xmleditor/_distrib/doc/commands/pick.html



---
PS: We cannot help you more if you decide to implement such custom
control (or even the command button and its macro). Such level of
support is reserved to Professional Edition customers.


Reply via email to