Attributes window - include data from other documents in pulldown list for xs:IDREF

Having trouble installing Oxygen? Got a bug to report? Post it all here.
MaNI
Posts: 10
Joined: Mon Sep 21, 2015 9:52 pm

Attributes window - include data from other documents in pulldown list for xs:IDREF

Post by MaNI »

I have references of the form:

Code: Select all


<xr refdoc="xx.xml" rid="fooid123"/>
Where rid is of type xs:IDREF.
The document in which the node with the matching ID is to be found is contained in 'refdoc'

When I click on xr and go the attributes window, the attributes windows allows a pulldown list of all possible values for rid, however it populated them only from the current document.
Is there a way (possibly via xpath query? Or alternatively some other built in feature?) that I could have the IDREF pulldown instead either:
1) Show ID values from refdoc instead of the current doc
2) Failing that, have it show all ID values from a list of documents (e.g. all documents in the project could be included?)
alex_jitianu
Posts: 1016
Joined: Wed Nov 16, 2005 11:11 am

Re: Attributes window - include data from other documents in pulldown list for xs:IDREF

Post by alex_jitianu »

Hello,

You can configure content completion through a configuration file. In this configuration file you can specify that the values are taken by executing an XSLT:

Code: Select all

<match attributeName="type">
<xslt href="../xsl/get_values_from_db.xsl" useCache="false" action="replace"/>
</match>
In your case the file with the IDs is specified in the @refdoc so please take a look how to use the contextElementXPathExpression parameter, in the section Configuring Proposals in the Context for which the Content Completion was Invoked

Best regards,
Alex
MaNI
Posts: 10
Joined: Mon Sep 21, 2015 9:52 pm

Re: Attributes window - include data from other documents in pulldown list for xs:IDREF

Post by MaNI »

Hello,

I think this will work only in 'edit' mode - while what I am looking at here is the " In-place Attributes Editor (Full Version)" inside author mode.
Will this work also for that?

Thanks,
Malcolm
alex_jitianu
Posts: 1016
Joined: Wed Nov 16, 2005 11:11 am

Re: Attributes window - include data from other documents in pulldown list for xs:IDREF

Post by alex_jitianu »

Hello,

Yes, it will work. You are basically contributing to content completion which means that your values will appear everywhere that attribute is being edited: text page, author page, in-place attributes editor etc.

Best regards,
Alex
Post Reply