functions in transformation scenario configurations

Oxygen general issues.
Doug
Posts: 28
Joined: Sat Jun 15, 2013 1:34 am

functions in transformation scenario configurations

Post 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
Radu
Posts: 9445
Joined: Fri Jul 09, 2004 5:18 pm

Re: functions in transformation scenario configurations

Post 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
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Doug
Posts: 28
Joined: Sat Jun 15, 2013 1:34 am

Re: functions in transformation scenario configurations

Post 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.
Radu
Posts: 9445
Joined: Fri Jul 09, 2004 5:18 pm

Re: functions in transformation scenario configurations

Post 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
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
msharcourt
Posts: 7
Joined: Thu Oct 24, 2013 6:34 pm

Re: functions in transformation scenario configurations

Post by msharcourt »

I second a request to do this. In particular, I would like to do something like this:

oxy_replace(${cfn}, "_stage1", "_stage2")
Radu
Posts: 9445
Joined: Fri Jul 09, 2004 5:18 pm

Re: functions in transformation scenario configurations

Post 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
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Post Reply