Page 1 of 1
functions in transformation scenario configurations
Posted: Fri Jan 31, 2014 5:36 am
by Doug
Is there any way I can parse an editor or custom variable in the "Save as" field of the Output tab of a transformation configuration with perhaps an xpath of java function? I need to do something like fn:upper-case(fn:substring(${cfn},1,4)).xml
Thanks, Doug
Re: functions in transformation scenario configurations
Posted: Fri Jan 31, 2014 2:00 pm
by Radu
Hi Doug,
Unfortunately we do not have such advanced constructs for our editor variables support.
We'll possibly offer more flexibility for this in a future version and I added your vote for it.
As a workaround if you are using XSLT 2.0 maybe you could use the result-document construct to control the place where the output gets saved by the XSLT processor.
Regards,
Radu
Re: functions in transformation scenario configurations
Posted: Fri Jan 31, 2014 7:02 pm
by Doug
Thanks Radu. I'll look into result-document. Unforutuatetly my transformation is written in xquery. Is there anything equivalent for xquery? If not, perhaps I can pass the xquery results to xslt with something like saxon:transform.
Re: functions in transformation scenario configurations
Posted: Mon Feb 03, 2014 9:42 am
by Radu
Hi Doug,
Unfortunately I don't think XQuery has the capabilities to write to multiple output sources (at least in the base specification), there might be extensions which could be used but I don't know for sure.
Regards,
Radu
Re: functions in transformation scenario configurations
Posted: Mon Mar 17, 2014 8:57 pm
by msharcourt
I second a request to do this. In particular, I would like to do something like this:
oxy_replace(${cfn}, "_stage1", "_stage2")
Re: functions in transformation scenario configurations
Posted: Tue Mar 18, 2014 10:03 am
by Radu
Hi,
I understand, one possible option we thought about would be to add a custom editor variable called ${xpath('expression')} which would run an XPath 2.0 with the specified expression without an XML context. This would allow you to do something like: ${xpath('replace(${cfn}, "_stage1", "_stage2")')}.
I'll update this thread when we make an improvement for this.
Regards,
Radu