<div dir="ltr">I can verify that works.  I did it once accidentally lost a bit of work.  I don&#39;t think undo worked for me.  Ever since I&#39;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&#39;m sure I can do pretty much everything I want using custom external tools, but I haven&#39;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">&lt;<a href="mailto:george@oxygenxml.com" target="_blank">george@oxygenxml.com</a>&gt;</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 &quot;Save As&quot; 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>
&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;<br>
&lt;xsl:stylesheet xmlns:xsl=&quot;<a href="http://www.w3.org/1999/XSL/Transform" target="_blank">http://www.w3.org/1999/XSL/Transform</a>&quot;<br>
   version=&quot;2.0&quot;&gt;<br>
<br>
</div>   &lt;xsl:template match=&quot;node() | @*&quot;&gt;<br>
     &lt;xsl:copy&gt;<br>
       &lt;xsl:apply-templates select=&quot;node() | @*&quot;/&gt;<br>
     &lt;/xsl:copy&gt;<br>
   &lt;/xsl:template&gt;<br>
<br>
   &lt;xsl:template match=&quot;text()&quot;&gt;<br>
     &lt;xsl:if test=&quot;normalize-space(.)=&#39;&#39;&quot;&gt;&lt;xsl:copy-of select=&quot;.&quot;/&gt;&lt;/xsl:if&gt;<br>
   &lt;/xsl:template&gt;<br>
<br>
&lt;/xsl:stylesheet&gt;<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>
&lt;oXygen/&gt; 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>
&gt; Gerrit, you leave a misimpression that I suggested the OP use d-o-e,<br>
&gt; when in fact I was holding my nose when I copied that bit of his code.<br>
&gt; (I copied the code with one hand while I held my nose with the other.)<br>
&gt; I even offered that he should perhaps consider using a character map<br>
&gt; instead. I guess you missed that part. :-P<br>
&gt;<br>
&gt; I actually don&#39;t think d-o-e is always evil. Just usually. Maybe<br>
&gt; always in XSLT 2.0. But it is sometimes useful to commandeer the XSLT<br>
&gt; serializer to produce non-XML outputs even with method=&quot;xml&quot;, and in<br>
&gt; 1.0 ... maybe a case of one evil begetting another?<br>
&gt;<br>
&gt; Plus, didn&#39;t you like my innovative and elegant use of<br>
&gt; for-each-group[@group-by=&#39;true()&#39;] to avoid a redundant tree traversal<br>
&gt; into the descendants he wanted to collect?<br>
&gt;<br>
&gt; Back to oXygen -- let&#39;s see what George has to say about my impossible<br>
&gt; feature request (some way to &quot;modify&quot; an original file with XSLT). I<br>
&gt; am not above using the debugger, as a stopgap, to accomplish the same<br>
&gt; end (running a transformation and replacing an original with its<br>
&gt; transformation result).<br>
&gt;<br>
&gt; Cheers, Wendell<br>
&gt;<br>
&gt; Wendell Piez | <a href="http://www.wendellpiez.com" target="_blank">http://www.wendellpiez.com</a><br>
&gt; XML | XSLT | electronic publishing<br>
&gt; Eat Your Vegetables<br>
&gt; _____oo_________o_o___ooooo____ooooooo_^<br>
&gt;<br>
&gt;<br>
&gt; On Wed, Nov 20, 2013 at 11:00 AM, Imsieke, Gerrit, le-tex<br>
&gt; &lt;<a href="mailto:gerrit.imsieke@le-tex.de">gerrit.imsieke@le-tex.de</a>&gt; wrote:<br>
&gt;&gt; +1<br>
&gt;&gt;<br>
&gt;&gt; And this suggestion kind of compensates your recent d-o-e proposal on<br>
&gt;&gt; xsl-list ;)<br>
&gt;&gt;<br>
&gt;&gt; (I didn’t even read the post in full because “d-o-e” is a kind of<br>
&gt;&gt; stopword for me, similar to “XSLT 1.0”, “CDATA”, or “named entity”.)<br>
&gt;&gt;<br>
&gt;&gt; Sorry fellow oXygenists for taking this off-topic. And Wendell, I hope<br>
&gt;&gt; you don’t mind a little teasing.<br>
&gt;&gt;<br>
&gt;&gt; Gerrit<br>
&gt;&gt;<br>
&gt;&gt; On 20.11.2013 16:49, Wendell Piez wrote:<br>
&gt;&gt;&gt; Eliot and oXygenists,<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Since oXygen won&#39;t save over the XML source, I&#39;d have the<br>
&gt;&gt;&gt; transformation scenario display output in the the XML results, then<br>
&gt;&gt;&gt; save from there. Two steps, not one.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Adding to Eliot&#39;s request -- I know the usefulness of a generalized<br>
&gt;&gt;&gt; &quot;run XSLT and update the document with the result&quot; has been discussed,<br>
&gt;&gt;&gt; but I can&#39;t remember what the impediments are.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Something like an option in a transformation scenario to &quot;replace<br>
&gt;&gt;&gt; source document&quot;?<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Along similar lines, if transformation scenarios could reference<br>
&gt;&gt;&gt; editor windows as well as files, one could write an XSLT, apply it to<br>
&gt;&gt;&gt; an XML, inspect the output in the results view, and save it (even over<br>
&gt;&gt;&gt; the original) if one liked it, or revise the XSLT and run it again if<br>
&gt;&gt;&gt; necessary. This can be done now with more overhead (we have to save<br>
&gt;&gt;&gt; the XSLT out first, then create a transformation scenario). Perhaps a<br>
&gt;&gt;&gt; particular buffer could be designated as a &quot;sandbox&quot; for such purposes<br>
&gt;&gt;&gt; (and contain XSLT or XQuery).<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Of course it would be dangerous, but so are lots of power tools.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Cheers, Wendell<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Wendell Piez | <a href="http://www.wendellpiez.com" target="_blank">http://www.wendellpiez.com</a><br>
&gt;&gt;&gt; XML | XSLT | electronic publishing<br>
&gt;&gt;&gt; Eat Your Vegetables<br>
&gt;&gt;&gt; _____oo_________o_o___ooooo____ooooooo_^<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; On Wed, Nov 20, 2013 at 12:05 AM, Eliot Kimber &lt;<a href="mailto:ekimber@rsicms.com">ekimber@rsicms.com</a>&gt; wrote:<br>
&gt;&gt;&gt;&gt; For the DITA RelaxNG support that will be in DITA 1.3 I want to implement<br>
&gt;&gt;&gt;&gt; an action that can be applied to RNG document type shell grammars that<br>
&gt;&gt;&gt;&gt; looks at each referenced module, gets its domains attribute contribution<br>
&gt;&gt;&gt;&gt; (which will be in a specific subelement within the referenced module, and<br>
&gt;&gt;&gt;&gt; add it to the right place in the shell (a pattern named “domains-att”).<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; This is of course easy to do with XSLT.<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; My question: what’s the best way to set this up in Oxygen so that I can<br>
&gt;&gt;&gt;&gt; just do an “update domains attribute” action when editing a document type<br>
&gt;&gt;&gt;&gt; shell schema?<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; Thanks,<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; Eliot<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; --<br>
&gt;&gt;&gt;&gt; Eliot Kimber<br>
&gt;&gt;&gt;&gt; Senior Solutions Architect<br>
&gt;&gt;&gt;&gt; &quot;Bringing Strategy, Content, and Technology Together&quot;<br>
&gt;&gt;&gt;&gt; Main: <a href="tel:512.554.9368" value="+15125549368">512.554.9368</a><br>
&gt;&gt;&gt;&gt; <a href="http://www.reallysi.com" target="_blank">www.reallysi.com</a><br>
&gt;&gt;&gt;&gt; <a href="http://www.rsuitecms.com" target="_blank">www.rsuitecms.com</a><br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; _______________________________________________<br>
&gt;&gt;&gt;&gt; oXygen-user mailing list<br>
&gt;&gt;&gt;&gt; <a href="mailto:oXygen-user@oxygenxml.com">oXygen-user@oxygenxml.com</a><br>
&gt;&gt;&gt;&gt; <a href="http://www.oxygenxml.com/mailman/listinfo/oxygen-user" target="_blank">http://www.oxygenxml.com/mailman/listinfo/oxygen-user</a><br>
&gt;&gt;&gt; _______________________________________________<br>
&gt;&gt;&gt; oXygen-user mailing list<br>
&gt;&gt;&gt; <a href="mailto:oXygen-user@oxygenxml.com">oXygen-user@oxygenxml.com</a><br>
&gt;&gt;&gt; <a href="http://www.oxygenxml.com/mailman/listinfo/oxygen-user" target="_blank">http://www.oxygenxml.com/mailman/listinfo/oxygen-user</a><br>
&gt;&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; --<br>
&gt;&gt; Gerrit Imsieke<br>
&gt;&gt; Geschäftsführer / Managing Director<br>
&gt;&gt; le-tex publishing services GmbH<br>
&gt;&gt; Weissenfelser Str. 84, 04229 Leipzig, Germany<br>
&gt;&gt; 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>
&gt;&gt; <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>
&gt;&gt;<br>
&gt;&gt; Registergericht / Commercial Register: Amtsgericht Leipzig<br>
&gt;&gt; Registernummer / Registration Number: HRB 24930<br>
&gt;&gt;<br>
&gt;&gt; Geschäftsführer: Gerrit Imsieke, Svea Jelonek,<br>
&gt;&gt; Thomas Schmidt, Dr. Reinhard Vöckler<br>
&gt;&gt; _______________________________________________<br>
&gt;&gt; oXygen-user mailing list<br>
&gt;&gt; <a href="mailto:oXygen-user@oxygenxml.com">oXygen-user@oxygenxml.com</a><br>
&gt;&gt; <a href="http://www.oxygenxml.com/mailman/listinfo/oxygen-user" target="_blank">http://www.oxygenxml.com/mailman/listinfo/oxygen-user</a><br>
&gt; _______________________________________________<br>
&gt; oXygen-user mailing list<br>
&gt; <a href="mailto:oXygen-user@oxygenxml.com">oXygen-user@oxygenxml.com</a><br>
&gt; <a href="http://www.oxygenxml.com/mailman/listinfo/oxygen-user" target="_blank">http://www.oxygenxml.com/mailman/listinfo/oxygen-user</a><br>
&gt;<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>