Display of target data for xs:IDREF (Author mode)
Having trouble installing Oxygen? Got a bug to report? Post it all here.
-
- Posts: 10
- Joined: Mon Sep 21, 2015 9:52 pm
Display of target data for xs:IDREF (Author mode)
Hello,
I have a customer that uses oXygen and has asked me to produce XML for them to use in it.
The data has (pseudo-XML) something like:
bar <ref ref="123456"/> baz
And elsewhere in the data:
<target id="123456>foobarbaz</target>
The customer requires that in the display (Author mode) the 'ref element' gets replaced with the content 'foobarbaz' - so the display would show "bar >foobarbaz< baz" (Where <> is the little tag markers that your author mode shows.
I know how to do this substitution with e.g. XSLT but I can't seem to make author mode use the XSLT only CSS. Is it possible to have author mode to apply some XSLT before it displays? If not is there some other way that oXygen can achieve this?
Thanks,
Malcolm
I have a customer that uses oXygen and has asked me to produce XML for them to use in it.
The data has (pseudo-XML) something like:
bar <ref ref="123456"/> baz
And elsewhere in the data:
<target id="123456>foobarbaz</target>
The customer requires that in the display (Author mode) the 'ref element' gets replaced with the content 'foobarbaz' - so the display would show "bar >foobarbaz< baz" (Where <> is the little tag markers that your author mode shows.
I know how to do this substitution with e.g. XSLT but I can't seem to make author mode use the XSLT only CSS. Is it possible to have author mode to apply some XSLT before it displays? If not is there some other way that oXygen can achieve this?
Thanks,
Malcolm
-
- Posts: 1016
- Joined: Wed Nov 16, 2005 11:11 am
Re: Display of target data for xs:IDREF (Author mode)
Post by alex_jitianu »
Hello Malcom,
You can get the desired effect by using the oxy_xpath() function, like this:
Best regards,
Alex
You can get the desired effect by using the oxy_xpath() function, like this:
Code: Select all
ref {
content: oxy_xpath(oxy_concat('//target[@id=', attr(ref), ']/text()'));
}
Alex
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ Artificial Intelligence (AI Positron Assistant add-on)
- ↳ 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