Treat element as xi:include

Post here questions and problems related to oXygen frameworks/document types.
LeeHart
Posts: 6
Joined: Tue Oct 08, 2019 3:00 am

Treat element as xi:include

Post by LeeHart »

We'd like to have an element treated as `xi:include`, loading the file in the `href` attribute as text.
Is this currently supported? I browsed the docs but didn't see this.
I thought that in the CSS, `content : attr(href) ;` might work but it doesn't. If i add `-oxy-link : attr(href);` then clicking the href value in Author mode opens the referenced file, so I know the appropriate catalogs are set up.
Thanks,
Lee
Radu
Posts: 9059
Joined: Fri Jul 09, 2004 5:18 pm

Re: Treat element as xi:include

Post by Radu »

Hi Lee,
This cannot be easily done using just CSS. You would need to implement one of our Java based APIs to make this work.
https://www.oxygenxml.com/InstData/Edit ... olver.html
If you are a Java developer or have a Java developer willing to work on an Oxygen framework Java extension we could try to help with advice along the way.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
LeeHart
Posts: 6
Joined: Tue Oct 08, 2019 3:00 am

Re: Treat element as xi:include

Post by LeeHart »

Thanks. I'm fairly new to Java development (just a few projects), but I have many years of experience working with CSS and XSLT.
I see an implementation of that class for the DITA-OT project files (ro/sync/ecss/extensions/dita/DOTProjectAuthorReferenceResolver.java) - is that a reasonable start?

Lee
Radu
Posts: 9059
Joined: Fri Jul 09, 2004 5:18 pm

Re: Treat element as xi:include

Post by Radu »

Hi Lee,
Right, the DOTProjectAuthorReferenceResolver is a very simple example of a references resolver.
There is also a bit of documentation for implementing a references resolver as well:
https://www.oxygenxml.com/doc/versions/ ... olver.html
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Post Reply