<div dir="ltr">I can verify that works. I did it once accidentally lost a bit of work. I don't think undo worked for me. Ever since I've been using git a lot more, even on working sets.<div><br></div><div>Speaking of which, any chance to add git support. I'm sure I can do pretty much everything I want using custom external tools, but I haven't really tried it.</div>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Nov 22, 2013 at 8:03 AM, George Cristian Bina <span dir="ltr"><<a href="mailto:george@oxygenxml.com" target="_blank">george@oxygenxml.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Wendell,<br>
<br>
You cannot read and write in XSLT the same file.<br>
<br>
However, if your XSLT takes the document as input and outputs the<br>
transformed document then there is nothing that stops you from<br>
configuring the output of the transformation scenario to be the current<br>
file, use ${cf} in the "Save As" field of the Output tab when you setup<br>
the transformation scenario.<br>
<br>
Then, you can apply your processing by double clicking on the scenario<br>
in the Transformation Scenarios dialog - the nice effect of this is that<br>
the content in the editor will be automatically refreshed with the<br>
change, as we check this and load automatically the file from disk if it<br>
is changed - just make sure the file is saved before invoking the<br>
transformation, otherwise you will be asked if you want to reload the<br>
content from disk. The added bonus is that you also have undo support<br>
after you perform the change you can easily go back to the previous<br>
state if you are unhappy with the new document content.<br>
<br>
I just tested a clear stylesheet like<br>
<div class="im"><br>
<?xml version="1.0" encoding="UTF-8"?><br>
<xsl:stylesheet xmlns:xsl="<a href="http://www.w3.org/1999/XSL/Transform" target="_blank">http://www.w3.org/1999/XSL/Transform</a>"<br>
version="2.0"><br>
<br>
</div> <xsl:template match="node() | @*"><br>
<xsl:copy><br>
<xsl:apply-templates select="node() | @*"/><br>
</xsl:copy><br>
</xsl:template><br>
<br>
<xsl:template match="text()"><br>
<xsl:if test="normalize-space(.)=''"><xsl:copy-of select="."/></xsl:if><br>
</xsl:template><br>
<br>
</xsl:stylesheet><br>
<br>
that will preserve the indenting but will clear all text content from<br>
the current document.<br>
<div class="im HOEnZb"><br>
Best Regards,<br>
George<br>
--<br>
George Cristian Bina<br>
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger<br>
<a href="http://www.oxygenxml.com" target="_blank">http://www.oxygenxml.com</a><br>
<br>
</div><div class="HOEnZb"><div class="h5">On 11/21/13, 6:06 PM, Wendell Piez wrote:<br>
> Gerrit, you leave a misimpression that I suggested the OP use d-o-e,<br>
> when in fact I was holding my nose when I copied that bit of his code.<br>
> (I copied the code with one hand while I held my nose with the other.)<br>
> I even offered that he should perhaps consider using a character map<br>
> instead. I guess you missed that part. :-P<br>
><br>
> I actually don't think d-o-e is always evil. Just usually. Maybe<br>
> always in XSLT 2.0. But it is sometimes useful to commandeer the XSLT<br>
> serializer to produce non-XML outputs even with method="xml", and in<br>
> 1.0 ... maybe a case of one evil begetting another?<br>
><br>
> Plus, didn't you like my innovative and elegant use of<br>
> for-each-group[@group-by='true()'] to avoid a redundant tree traversal<br>
> into the descendants he wanted to collect?<br>
><br>
> Back to oXygen -- let's see what George has to say about my impossible<br>
> feature request (some way to "modify" an original file with XSLT). I<br>
> am not above using the debugger, as a stopgap, to accomplish the same<br>
> end (running a transformation and replacing an original with its<br>
> transformation result).<br>
><br>
> Cheers, Wendell<br>
><br>
> Wendell Piez | <a href="http://www.wendellpiez.com" target="_blank">http://www.wendellpiez.com</a><br>
> XML | XSLT | electronic publishing<br>
> Eat Your Vegetables<br>
> _____oo_________o_o___ooooo____ooooooo_^<br>
><br>
><br>
> On Wed, Nov 20, 2013 at 11:00 AM, Imsieke, Gerrit, le-tex<br>
> <<a href="mailto:gerrit.imsieke@le-tex.de">gerrit.imsieke@le-tex.de</a>> wrote:<br>
>> +1<br>
>><br>
>> And this suggestion kind of compensates your recent d-o-e proposal on<br>
>> xsl-list ;)<br>
>><br>
>> (I didn’t even read the post in full because “d-o-e” is a kind of<br>
>> stopword for me, similar to “XSLT 1.0”, “CDATA”, or “named entity”.)<br>
>><br>
>> Sorry fellow oXygenists for taking this off-topic. And Wendell, I hope<br>
>> you don’t mind a little teasing.<br>
>><br>
>> Gerrit<br>
>><br>
>> On 20.11.2013 16:49, Wendell Piez wrote:<br>
>>> Eliot and oXygenists,<br>
>>><br>
>>> Since oXygen won't save over the XML source, I'd have the<br>
>>> transformation scenario display output in the the XML results, then<br>
>>> save from there. Two steps, not one.<br>
>>><br>
>>> Adding to Eliot's request -- I know the usefulness of a generalized<br>
>>> "run XSLT and update the document with the result" has been discussed,<br>
>>> but I can't remember what the impediments are.<br>
>>><br>
>>> Something like an option in a transformation scenario to "replace<br>
>>> source document"?<br>
>>><br>
>>> Along similar lines, if transformation scenarios could reference<br>
>>> editor windows as well as files, one could write an XSLT, apply it to<br>
>>> an XML, inspect the output in the results view, and save it (even over<br>
>>> the original) if one liked it, or revise the XSLT and run it again if<br>
>>> necessary. This can be done now with more overhead (we have to save<br>
>>> the XSLT out first, then create a transformation scenario). Perhaps a<br>
>>> particular buffer could be designated as a "sandbox" for such purposes<br>
>>> (and contain XSLT or XQuery).<br>
>>><br>
>>> Of course it would be dangerous, but so are lots of power tools.<br>
>>><br>
>>> Cheers, Wendell<br>
>>><br>
>>> Wendell Piez | <a href="http://www.wendellpiez.com" target="_blank">http://www.wendellpiez.com</a><br>
>>> XML | XSLT | electronic publishing<br>
>>> Eat Your Vegetables<br>
>>> _____oo_________o_o___ooooo____ooooooo_^<br>
>>><br>
>>><br>
>>> On Wed, Nov 20, 2013 at 12:05 AM, Eliot Kimber <<a href="mailto:ekimber@rsicms.com">ekimber@rsicms.com</a>> wrote:<br>
>>>> For the DITA RelaxNG support that will be in DITA 1.3 I want to implement<br>
>>>> an action that can be applied to RNG document type shell grammars that<br>
>>>> looks at each referenced module, gets its domains attribute contribution<br>
>>>> (which will be in a specific subelement within the referenced module, and<br>
>>>> add it to the right place in the shell (a pattern named “domains-att”).<br>
>>>><br>
>>>> This is of course easy to do with XSLT.<br>
>>>><br>
>>>> My question: what’s the best way to set this up in Oxygen so that I can<br>
>>>> just do an “update domains attribute” action when editing a document type<br>
>>>> shell schema?<br>
>>>><br>
>>>> Thanks,<br>
>>>><br>
>>>> Eliot<br>
>>>><br>
>>>> --<br>
>>>> Eliot Kimber<br>
>>>> Senior Solutions Architect<br>
>>>> "Bringing Strategy, Content, and Technology Together"<br>
>>>> Main: <a href="tel:512.554.9368" value="+15125549368">512.554.9368</a><br>
>>>> <a href="http://www.reallysi.com" target="_blank">www.reallysi.com</a><br>
>>>> <a href="http://www.rsuitecms.com" target="_blank">www.rsuitecms.com</a><br>
>>>><br>
>>>><br>
>>>> _______________________________________________<br>
>>>> oXygen-user mailing list<br>
>>>> <a href="mailto:oXygen-user@oxygenxml.com">oXygen-user@oxygenxml.com</a><br>
>>>> <a href="http://www.oxygenxml.com/mailman/listinfo/oxygen-user" target="_blank">http://www.oxygenxml.com/mailman/listinfo/oxygen-user</a><br>
>>> _______________________________________________<br>
>>> oXygen-user mailing list<br>
>>> <a href="mailto:oXygen-user@oxygenxml.com">oXygen-user@oxygenxml.com</a><br>
>>> <a href="http://www.oxygenxml.com/mailman/listinfo/oxygen-user" target="_blank">http://www.oxygenxml.com/mailman/listinfo/oxygen-user</a><br>
>>><br>
>><br>
>> --<br>
>> Gerrit Imsieke<br>
>> Geschäftsführer / Managing Director<br>
>> le-tex publishing services GmbH<br>
>> Weissenfelser Str. 84, 04229 Leipzig, Germany<br>
>> Phone <a href="tel:%2B49%20341%20355356%20110" value="+49341355356110">+49 341 355356 110</a>, Fax <a href="tel:%2B49%20341%20355356%20510" value="+49341355356510">+49 341 355356 510</a><br>
>> <a href="mailto:gerrit.imsieke@le-tex.de">gerrit.imsieke@le-tex.de</a>, <a href="http://www.le-tex.de" target="_blank">http://www.le-tex.de</a><br>
>><br>
>> Registergericht / Commercial Register: Amtsgericht Leipzig<br>
>> Registernummer / Registration Number: HRB 24930<br>
>><br>
>> Geschäftsführer: Gerrit Imsieke, Svea Jelonek,<br>
>> Thomas Schmidt, Dr. Reinhard Vöckler<br>
>> _______________________________________________<br>
>> oXygen-user mailing list<br>
>> <a href="mailto:oXygen-user@oxygenxml.com">oXygen-user@oxygenxml.com</a><br>
>> <a href="http://www.oxygenxml.com/mailman/listinfo/oxygen-user" target="_blank">http://www.oxygenxml.com/mailman/listinfo/oxygen-user</a><br>
> _______________________________________________<br>
> oXygen-user mailing list<br>
> <a href="mailto:oXygen-user@oxygenxml.com">oXygen-user@oxygenxml.com</a><br>
> <a href="http://www.oxygenxml.com/mailman/listinfo/oxygen-user" target="_blank">http://www.oxygenxml.com/mailman/listinfo/oxygen-user</a><br>
><br>
_______________________________________________<br>
oXygen-user mailing list<br>
<a href="mailto:oXygen-user@oxygenxml.com">oXygen-user@oxygenxml.com</a><br>
<a href="http://www.oxygenxml.com/mailman/listinfo/oxygen-user" target="_blank">http://www.oxygenxml.com/mailman/listinfo/oxygen-user</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr"><br><div> Steve<br></div></div>
</div>