Using doc function in an xpath_eval "variable"
Oxygen general issues.
-
- Posts: 110
- Joined: Fri May 14, 2010 12:14 am
Using doc function in an xpath_eval "variable"
I created an external tool that presents a pull-down menu of all targets in an ant build.xml file for execution. I set the working directory to ${pd}.
This works well if the build.xml is the current file in the editor, but fails if any other file is current with:
Code: Select all
cmd /C mvn compile -Dt=${ask('Choose a target:', combobox,( ${xpath_eval(string-join(fn:for-each (doc('build.xml')/project/target/@name, function($target) {concat("'",$target,"'",':',"'",$target,"'") } ) , ';' ) )} ), 'main')}
I was hoping the doc function was using the Working Directory of the external tool as the baseURI. I also tried doc('${pd}/build.xml'), but the project directory variable is not being resolved.An error occurred while expanding the possible values of the 'ask' editor variable, at line 0, column 0. Please check the syntax of the possible values: ''.
-
- Posts: 1016
- Joined: Wed Nov 16, 2005 11:11 am
Re: Using doc function in an xpath_eval "variable"
Post by alex_jitianu »
Hi,
Best regards,
Alex
In my tests it didn't really matter if the build.xml file was opened or not in an editor. The relative paths are expanded to the oxygen installation directory. Luckily, the workaround is to use ${pdu} inside the doc() function. The doc() function expects an URL so ${pd}, which is a directory path, doesn't work.I was hoping the doc function was using the Working Directory of the external tool as the baseURI.
Best regards,
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