xs:anyURI-based content completion in a TEI project using exist-db remote sources

Oxygen general issues.
kai_weber
Posts: 24
Joined: Tue May 05, 2020 9:57 am
Location: Tübingen, Germany
Contact:

xs:anyURI-based content completion in a TEI project using exist-db remote sources

Post by kai_weber »

As you posted recently in this forum it is now possible with oXygen v25 to use auto-completion with references that are modelled as xs:anyURI in the TEI schema. I can see that it picks up on the xml:id attributes defined in the same file. However, I can not get this working across files, either locally nor with a remote data source. A remote data source (TEI documents stored in an eXist database) is my main goal, but for understanding the problem I also tried a configuration with a local main file definition.

With an .xpr project setup and a registered local main file that contains some xml:id attributes, I cannot see the IDs from the main file being offered in a different file's content completion. Content completion works in principle, but it only offers the IDs from the file I am working on, not from the main file.

Actually my target would be to have something like a main file defined from the remote exist-db source and then get all IDs from this remote main file in the auto-completion, ideally with parsing of the main file's <xi:include>s also done locally, not pre-computed on the data base server. Is something like this possible at all?
Radu
Posts: 9434
Joined: Fri Jul 09, 2004 5:18 pm

Re: xs:anyURI-based content completion in a TEI project using exist-db remote sources

Post by Radu »

Hi,

So:
With an .xpr project setup and a registered local main file that contains some xml:id attributes, I cannot see the IDs from the main file being offered in a different file's content completion. Content completion works in principle, but it only offers the IDs from the file I am working on, not from the main file.
So that main file present in the Oxygen Project "Main Files" folder has xi:includes pointing directly or indirectly to the edited file, right? This should work from what remember, if you send us a small sample project to reproduce the problem we can look into it (support@oxygenxml.com).
Actually my target would be to have something like a main file defined from the remote exist-db source and then get all IDs from this remote main file in the auto-completion, ideally with parsing of the main file's <xi:include>s also done locally, not pre-computed on the data base server. Is something like this possible at all?
We have something called the content completion configuration file, specific for each vocabulary:
https://www.oxygenxml.com/doc/versions/ ... osals.html
such a cc_config.xml file can specify that for a certain element with a certain attribute, an XSLT stylesheet should be called to compute the possible values:
https://www.oxygenxml.com/doc/versions/ ... in_context
and an XSLT stylesheet can use the document() XSLT function to maybe read an XML document using HTTP and obtain values from it.

There would also be the possibility to implement a content completion customization using Java extensions and take control in the Java code over how certain attribute values should be computed.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
kai_weber
Posts: 24
Joined: Tue May 05, 2020 9:57 am
Location: Tübingen, Germany
Contact:

Re: xs:anyURI-based content completion in a TEI project using exist-db remote sources

Post by kai_weber »

Thanks Radu,
as fast and helpful as always! This cc_config.xml is exactly what I needed!
(And for the local main file setup I keep forgetting that not only the source file of the IDs, but also the target file, that is being edited, needs to be included...)
Post Reply