[oXygen-user] Custom action to process a document and update an element?

Eliot Kimber ekimber at rsicms.com
Mon Nov 25 09:54:24 CST 2013


I was thinking the XQuery update seemed like the appropriate
modify-in-place semantic and the type of processing I’m thinking of in
this case could be done easily enough with XQuery, although maybe not
quite as conveniently as with XSLT.

Cheers,

E.
-- 
Eliot Kimber
Senior Solutions Architect
"Bringing Strategy, Content, and Technology Together"
Main: 512.554.9368
www.reallysi.com
www.rsuitecms.com




On 11/25/13, 9:49 AM, "Wendell Piez" <wapiez at wendellpiez.com> wrote:

>Hi George,
>
>On Fri, Nov 22, 2013 at 11:03 AM, George Cristian Bina
><george at oxygenxml.com> wrote:
>> You cannot read and write in XSLT the same file.
>
>Indeed.
>
>> However, if your XSLT takes the document as input and outputs the
>> transformed document then there is nothing that stops you from
>>configuring
>> the output of the transformation scenario to be the current file, use
>>${cf}
>> in the "Save As" field of the Output tab when you setup the
>>transformation
>> scenario.
>>
>> Then, you can apply your processing by double clicking on the scenario
>>in
>> the Transformation Scenarios dialog - the nice effect of this is that
>>the
>> content in the editor will be automatically refreshed with the change,
>>as we
>> check this and load automatically the file from disk if it is changed -
>>just
>> make sure the file is saved before invoking the transformation,
>>otherwise
>> you will be asked if you want to reload the content from disk. The added
>> bonus is that you also have undo support after you perform the change
>>you
>> can easily go back to the previous state if you are unhappy with the new
>> document content.
>
>Nice tip: I will try this.
>
>Of course this is a delicate operation. In some ways XSLT is not
>suited to the task, since (as you note) the architecture isn't
>designed to support it. By the time you've set up all the tooling, you
>may as well do it the old-fashioned way. (Whatever you consider that
>to be. :-)
>
>Cheers, Wendell
>
>Wendell Piez | http://www.wendellpiez.com
>XML | XSLT | electronic publishing
>Eat Your Vegetables
>_____oo_________o_o___ooooo____ooooooo_^
>_______________________________________________
>oXygen-user mailing list
>oXygen-user at oxygenxml.com
>http://www.oxygenxml.com/mailman/listinfo/oxygen-user



More information about the oXygen-user mailing list