
In message <alpine.OSX.0.999.0707090906580.2139@lister.ei.virginia.edu> David Sewell <dsewell@virginia.edu> writes: Hi David (quick answer, on the road at conferences),
How does one get content completion in oXygen using XInclude?
I was thinking that you XInclude the entirety of the index.xml file into your (say) teiHeader somewhere, and then all you index references are local, so oXygen picks up the @xml:id attributes automatically when producing a list of attribute values defined as pointers to such. The problem is, of course, that you get a list of all of index items and that might be a long list, but in starting to type them in that would take one to the right context quickly. I suppose its usefulness would be dependent on the number of index items one has, I've only used this technique for a small number of terms. -James
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: dsewell@virginia.edu Tel: +1 434 924 9973 Web: http://rotunda.upress.virginia.edu/