Transformation Scenario ${xpath_eval} and regex
Having trouble installing Oxygen? Got a bug to report? Post it all here.
Transformation Scenario ${xpath_eval} and regex
I am using editor variable ${xpath_eval} within a transformation output scenario Save As box, because I want to tweak the base uri of the input before sending it to output. But when I do something like this...
...I get an error. The line has been interpreted as asking for the file to be saved at `${pd}/${base-uri()}` (if such an editor variable existed). When I open up the transformation scenario I see that the formula has been changed to this...
It works fine if I change \w to something like [a-zA-Z0-9].
I assume that oXygen is normalizing path separators. Is there any way to exempt backslashes that are in an {$xpath_eval}?
Code: Select all
${pd}/${xpath_eval(replace(base-uri(),'.+/(\w+).+','$1'))}.html
Code: Select all
${pd}/${xpath_eval(replace(base-uri(),'.+/(/w+).+','$1'))}.html
I assume that oXygen is normalizing path separators. Is there any way to exempt backslashes that are in an {$xpath_eval}?
-
- Posts: 1009
- Joined: Wed Nov 16, 2005 11:11 am
Re: Transformation Scenario ${xpath_eval} and regex
Post by alex_jitianu »
Hello,
Thank you for reporting this issue. We will send you a notification as soon as it gets fixed and a new build containing the fix is released. Until then, perhaps you can tweak the regular expression a bit, replacing that backslash with a different construction. If I understand it correctly, you want to keep just the first word from the file name. An [^abc] construction could work, if there are certain patterns that your files usually have:
Best regards,
Alex
Thank you for reporting this issue. We will send you a notification as soon as it gets fixed and a new build containing the fix is released. Until then, perhaps you can tweak the regular expression a bit, replacing that backslash with a different construction. If I understand it correctly, you want to keep just the first word from the file name. An [^abc] construction could work, if there are certain patterns that your files usually have:
Code: Select all
replace(base-uri(),'.+/([^/. -_]+).+','$1')
Alex
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