[oXygen-user] Ajax-like content completion list in oXygen?

David Sewell
Mon Jul 9 08:33:36 CDT 2007


James,

The use case is essentially to emulate the functionality of indexing
software within an XML editing environment. Although I haven't used
programs like CINDEX myself, my understanding is that they allow one to
create an index, then use defined entries/subentries to generate a list
of options for insertion within the file to be indexed. You're
right that it would be better to use pointers than literal text, so that
if entries in the index file are changed the references to them in the
indexed text don't need to be manually updated.

How does one get content completion in oXygen using XInclude? If I have
an element like
  <xi:include href="index.xml" xpointer=""/>
is content completion available on @xpointer? (I can't make it work, if
so.)

David

On Sat, 7 Jul 2007, James Cummings wrote:

> Hi David,
>
> This sounds like lots of fun, but I guess I want to know more about why you
> want to do this? Doesn't this really go against the re-use principle of XML
> text encoding?  I mean, isn't it better to do something like <index
> sameAs="index.xml#catsAndDogs"/> pointing to an <entry xml:id="catsAndDogs">
> in index.xml (or better, temporarily XIncluding it, so having local pointers
> oXygen has no problem providing in a drop-down list), so not entering the text
> in that point?  XSLT postprocessing can of course then stick in the text if it
> is really needed for standalone distribution. ... But I know you know all of
> this, which is then what prompts my confusion.   What is the benefit of
> sticking in the actual text rather than pointers to IDs?  What is your
> use-case?  Why is it better to put in the full text rather than a pointer?
>
> It does sound like a fun idea though.
>
> Just curious,
> -James
>
> David Sewell wrote:
> > I'm wondering how the following might be accomplished in oXygen.
> >
> > Suppose I have an index of terms stored in an XML file, call it
> > "index.xml". The file looks like this:
> >     <index>
> >         <entry>cats : and dogs</entry>
> >         <entry>cats : and mice</entry>  <!-- etc. -->
> >     <index>
> >
> > I am editing an XML file, call it "doc.xml",  in which I want to insert
> > index terms contained in the index file, like so:
> >
> >     <p>In 2006 Felix the cat caught over 200
> >        mice.<index><term>cats: and mice</term></index></p>
> >
> > While editing doc.xml, after I type "<term>", I want to access a list of
> > possible entries drawn from index.xml. Ideally this would be implemented
> > in the manner of popular Ajax-based form entry, so that typing the first
> > few letters would call up a window containing a list of all index
> > entries beginning with those letters.
> >
> > Because index.xml could contain thousands of entries, this goes beyond
> > what oXygen content completion or code templates are designed to do.
> > Would this task require writing a plug-in for oXygen? Or are there
> > off-the-shelf Ajax tools that would work with the Eclipse version of
> > oXygen to enable this kind of interaction?
> >
> > DS
> >
>
>
>

-- 
David Sewell, Editorial and Technical Manager
ROTUNDA, The University of Virginia Press
PO Box 801079, Charlottesville, VA 22904-4318 USA
Courier: 310 Old Ivy Way, Suite 302, Charlottesville VA 22903
Email:    Tel: +1 434 924 9973
Web: http://rotunda.upress.virginia.edu/



More information about the oXygen-user mailing list