
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
-- Dr James Cummings, Oxford Text Archive, University of Oxford James dot Cummings at oucs dot ox dot ac dot uk