Page 1 of 1
Using keyrefs in Author (or Text) mode
Posted: Sun May 06, 2012 4:35 pm
by fmkatz
I would like to style key references (as declared in the XSD) as links to the elements they reference - usually in the same document.
I found some leads in this forum, but mostly related to DITA, which is not what I'm working with.
Is it possible to do this?
Also, is there some way to follow a key reference in the Text view itself? Or some option that can be set to make that possible?
Thanks
Fred Katz
Re: Using keyrefs in Author (or Text) mode
Posted: Mon May 07, 2012 11:46 am
by Radu
Hi Fred,
For the Author page:
If the attribute which is referenced is of type
ID and the attributes which reference it are of type
IDREF then all you have to do in the CSS would be to define a selector like:
Code: Select all
*[href]:before{
link:attr(href);
content: "Link";
}
This is how we do it for Docbook 4 and 5:
OXYGEN_INSTALL_DIR/frameworks/docbook/css/links.css
If the referencing attributes are not of type IDREF then you would need to download our Author SDK (written in Java):
http://www.oxygenxml.com/oxygen_sdk.htm ... horing_SDK
and configure for your custom document type an implementation of:
http://www.oxygenxml.com/doc/ug-editor/ ... inder.html
Also, is there some way to follow a key reference in the Text view itself? Or some option that can be set to make that possible?
Unfortunately not. Maybe in a future version. I will add an improvement request for this.
Regards,
Radu
Re: Using keyrefs in Author (or Text) mode
Posted: Mon May 07, 2012 8:45 pm
by fmkatz
Thanks for the prompt reply, Radu.
Not exactly the answers I was hoping for, but I'll see if I can make them work.
Perhaps you can look into bumping the priority for keyref support - it seems like a glaring omission in an otherwise feature rich editor.
Fred
Re: Using keyrefs in Author (or Text) mode
Posted: Tue May 08, 2012 11:52 am
by Radu
Hi Fred,
So from what I understand your attributes are not defined as ID and IDREF but you have keyref constraints in place set up for them.
Indeed Oxygen does not have any special support for this situation, such support is quite hard to add because these constraints are made by evaluating certain XPath expressions in certain contexts.
We'll consider this for a future version.
Regards,
Radu