id/idref autocompletion fails for constrained anyURI
-
- Posts: 2
- Joined: Tue May 17, 2022 1:50 pm
id/idref autocompletion fails for constrained anyURI
So, the TEI just recently introduced (in version 4.4.0) a constraint on their teidata.anyURI datatype to disallow whitespace. In the resulting RelaxNG this looks like
This seems to break the nice Oxygen editor autocompletion feature for id/idrefs, e.g. I get no suggestions for @ref attribute values although @xml:ids are present in the document.
NB, since Oxygen still ships with v4.3.0 of the TEI schemas etc. this only occurs in customisations right now or when you force Oxygen editor to use the new schemas.
Is there anything I'm missing or is there something that can be done?
Code: Select all
<list>
<oneOrMore>
<data type="anyURI">
<param name="pattern">\S+</param>
</data>
</oneOrMore>
</list>
NB, since Oxygen still ships with v4.3.0 of the TEI schemas etc. this only occurs in customisations right now or when you force Oxygen editor to use the new schemas.
Is there anything I'm missing or is there something that can be done?
-
- Site Admin
- Posts: 2095
- Joined: Thu Jan 09, 2003 2:58 pm
Re: id/idref autocompletion fails for constrained anyURI
Hi,
Oxygen identifies anyURI data types and offers #id as possible completion proposals. However, when you alter the anyURI with additional constraints, that is not detected anymore as anyURI, and it is in fact a different type. The additional constraint may filter out some of the ID values for example, so in order to offer proposals in this case the #id values need to be tested to see which are still valid under the specified constraints and only those should be presented to the user.
One possible solution is to leverage the cc_config content completion configuration file for the TEI framework to specify there the content completion proposals for the attributes that use these constrained data types. You can match on an attribute from an element and then specify an XSLT that will basically process the document and return what values should be used as content completion proposals. In this XSLT you can construct the #id proposals when you match any element that has an @id attribute. See more about cc_config file at https://www.oxygenxml.com/doc/versions/ ... osals.html..
Best Regards,
George
Oxygen identifies anyURI data types and offers #id as possible completion proposals. However, when you alter the anyURI with additional constraints, that is not detected anymore as anyURI, and it is in fact a different type. The additional constraint may filter out some of the ID values for example, so in order to offer proposals in this case the #id values need to be tested to see which are still valid under the specified constraints and only those should be presented to the user.
One possible solution is to leverage the cc_config content completion configuration file for the TEI framework to specify there the content completion proposals for the attributes that use these constrained data types. You can match on an attribute from an element and then specify an XSLT that will basically process the document and return what values should be used as content completion proposals. In this XSLT you can construct the #id proposals when you match any element that has an @id attribute. See more about cc_config file at https://www.oxygenxml.com/doc/versions/ ... osals.html..
Best Regards,
George
George Cristian Bina
-
- Posts: 9434
- Joined: Fri Jul 09, 2004 5:18 pm
Re: id/idref autocompletion fails for constrained anyURI
Hi,
In addition to what George said, taking into account the impact on our TEI community of this change I added an internal issue on our side to see if we can fix this in a future Oxygen version without the need for extra framework customizations:
EXM-50553 id/idref autocompletion fails for constrained anyURI
If we manage to fix this in a future version, we'll update this forum thread.
Regards,
Radu
In addition to what George said, taking into account the impact on our TEI community of this change I added an internal issue on our side to see if we can fix this in a future Oxygen version without the need for extra framework customizations:
EXM-50553 id/idref autocompletion fails for constrained anyURI
If we manage to fix this in a future version, we'll update this forum thread.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 2
- Joined: Tue May 17, 2022 1:50 pm
Re: id/idref autocompletion fails for constrained anyURI
Thanks Radu and George for the quick and helpful reply!
For the record, there's also an open issue at https://github.com/TEIC/TEI/issues/2296 which I hadn't noticed.
For the record, there's also an open issue at https://github.com/TEIC/TEI/issues/2296 which I hadn't noticed.
-
- Posts: 9434
- Joined: Fri Jul 09, 2004 5:18 pm
Re: id/idref autocompletion fails for constrained anyURI
Hi,
As an update in Oxygen 25.0 we made a fix to make content completion work out of the box with the latest TEI schemas.
Regards,
Radu
As an update in Oxygen 25.0 we made a fix to make content completion work out of the box with the latest TEI schemas.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service