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

Wendell Piez wapiez at wendellpiez.com
Thu Nov 21 10:06:34 CST 2013


Gerrit, you leave a misimpression that I suggested the OP use d-o-e,
when in fact I was holding my nose when I copied that bit of his code.
(I copied the code with one hand while I held my nose with the other.)
I even offered that he should perhaps consider using a character map
instead. I guess you missed that part. :-P

I actually don't think d-o-e is always evil. Just usually. Maybe
always in XSLT 2.0. But it is sometimes useful to commandeer the XSLT
serializer to produce non-XML outputs even with method="xml", and in
1.0 ... maybe a case of one evil begetting another?

Plus, didn't you like my innovative and elegant use of
for-each-group[@group-by='true()'] to avoid a redundant tree traversal
into the descendants he wanted to collect?

Back to oXygen -- let's see what George has to say about my impossible
feature request (some way to "modify" an original file with XSLT). I
am not above using the debugger, as a stopgap, to accomplish the same
end (running a transformation and replacing an original with its
transformation result).

Cheers, Wendell

Wendell Piez | http://www.wendellpiez.com
XML | XSLT | electronic publishing
Eat Your Vegetables
_____oo_________o_o___ooooo____ooooooo_^


On Wed, Nov 20, 2013 at 11:00 AM, Imsieke, Gerrit, le-tex
<gerrit.imsieke at le-tex.de> wrote:
> +1
>
> And this suggestion kind of compensates your recent d-o-e proposal on
> xsl-list ;)
>
> (I didn’t even read the post in full because “d-o-e” is a kind of
> stopword for me, similar to “XSLT 1.0”, “CDATA”, or “named entity”.)
>
> Sorry fellow oXygenists for taking this off-topic. And Wendell, I hope
> you don’t mind a little teasing.
>
> Gerrit
>
> On 20.11.2013 16:49, Wendell Piez wrote:
>> Eliot and oXygenists,
>>
>> Since oXygen won't save over the XML source, I'd have the
>> transformation scenario display output in the the XML results, then
>> save from there. Two steps, not one.
>>
>> Adding to Eliot's request -- I know the usefulness of a generalized
>> "run XSLT and update the document with the result" has been discussed,
>> but I can't remember what the impediments are.
>>
>> Something like an option in a transformation scenario to "replace
>> source document"?
>>
>> Along similar lines, if transformation scenarios could reference
>> editor windows as well as files, one could write an XSLT, apply it to
>> an XML, inspect the output in the results view, and save it (even over
>> the original) if one liked it, or revise the XSLT and run it again if
>> necessary. This can be done now with more overhead (we have to save
>> the XSLT out first, then create a transformation scenario). Perhaps a
>> particular buffer could be designated as a "sandbox" for such purposes
>> (and contain XSLT or XQuery).
>>
>> Of course it would be dangerous, but so are lots of power tools.
>>
>> Cheers, Wendell
>>
>> Wendell Piez | http://www.wendellpiez.com
>> XML | XSLT | electronic publishing
>> Eat Your Vegetables
>> _____oo_________o_o___ooooo____ooooooo_^
>>
>>
>> On Wed, Nov 20, 2013 at 12:05 AM, Eliot Kimber <ekimber at rsicms.com> wrote:
>>> For the DITA RelaxNG support that will be in DITA 1.3 I want to implement
>>> an action that can be applied to RNG document type shell grammars that
>>> looks at each referenced module, gets its domains attribute contribution
>>> (which will be in a specific subelement within the referenced module, and
>>> add it to the right place in the shell (a pattern named “domains-att”).
>>>
>>> This is of course easy to do with XSLT.
>>>
>>> My question: what’s the best way to set this up in Oxygen so that I can
>>> just do an “update domains attribute” action when editing a document type
>>> shell schema?
>>>
>>> Thanks,
>>>
>>> Eliot
>>>
>>> --
>>> Eliot Kimber
>>> Senior Solutions Architect
>>> "Bringing Strategy, Content, and Technology Together"
>>> Main: 512.554.9368
>>> www.reallysi.com
>>> www.rsuitecms.com
>>>
>>>
>>> _______________________________________________
>>> oXygen-user mailing list
>>> oXygen-user at oxygenxml.com
>>> http://www.oxygenxml.com/mailman/listinfo/oxygen-user
>> _______________________________________________
>> oXygen-user mailing list
>> oXygen-user at oxygenxml.com
>> http://www.oxygenxml.com/mailman/listinfo/oxygen-user
>>
>
> --
> Gerrit Imsieke
> Geschäftsführer / Managing Director
> le-tex publishing services GmbH
> Weissenfelser Str. 84, 04229 Leipzig, Germany
> Phone +49 341 355356 110, Fax +49 341 355356 510
> gerrit.imsieke at le-tex.de, http://www.le-tex.de
>
> Registergericht / Commercial Register: Amtsgericht Leipzig
> Registernummer / Registration Number: HRB 24930
>
> Geschäftsführer: Gerrit Imsieke, Svea Jelonek,
> Thomas Schmidt, Dr. Reinhard Vöckler
> _______________________________________________
> 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