xpath_eval variable in code templates
Oxygen general issues.
-
- Posts: 87
- Joined: Fri Dec 19, 2003 6:02 pm
xpath_eval variable in code templates
what's wrong with the following code template?
the xpath_eval returns nothing.
all best,
toma
Code: Select all
<cit type="translation"> <quote xml:lang="de">${xpath_eval(${selection},1,string-length(${selection})-1)}</quote></cit>
all best,
toma
-
- Posts: 9438
- Joined: Fri Jul 09, 2004 5:18 pm
Re: xpath_eval variable in code templates
Hi Toma,
Your use case is quite interesting, I must admit we have not thought about it.
It all depends on the order in which the editor variables are expanded, in this case we expand first the xpath editor variable and then the selection editor variable. But we could try to reverse that, I will add an issue for it and update the forum thread when we manage to solve it.
Regards,
Radu
Your use case is quite interesting, I must admit we have not thought about it.
It all depends on the order in which the editor variables are expanded, in this case we expand first the xpath editor variable and then the selection editor variable. But we could try to reverse that, I will add an issue for it and update the forum thread when we manage to solve it.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 9438
- Joined: Fri Jul 09, 2004 5:18 pm
Re: xpath_eval variable in code templates
Hi Toma,
We'll work to fix this in Oxygen 17.1. By the way, when it will work, the expression that you will need to write will be something like:
Your original example did not contain the substring function + extra quotes need to be added around the selection expanded content in order to treat it as a literal.
Regards,
Radu
We'll work to fix this in Oxygen 17.1. By the way, when it will work, the expression that you will need to write will be something like:
Code: Select all
<cit type="translation"> <quote xml:lang="de">${xpath_eval(substring('${selection}',1,string-length('${selection}')-1))}</quote></cit>
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