Is transforming an XML snippet supported?
Posted: Thu Jan 27, 2011 8:21 pm
Dear <oXygen/> support,
Is transforming an XML snippet, more precisely a selection containing a tree fragment from an XML document, supported?
What I'm looking for is roughly this:
I have an XML file open in the XML Editor which contains some XML markup that I want to transform in-place into some other XML markup. As an example, the following:
...should be transformed into:
(Just as an example.)
I'm not that familiar with <oXygen/> yet, but from what I understand, a "transformation scenario" could be the right tool, since the above would actually only need some XSLT.
However, I would like to apply the transformation in-place, i.e., I'm imagining the following work-flow:
1) select the XML snippet in the XML Editor
2) invoke the transformation which directly replaces the selected snippet in the currently edited file
(I deliberately wrote "transformation" instead of "transformation scenario," since it seems to me that this kind of work-flow could also be called a "refactoring.")
Is something like this supported by <oXygen/>, applying some XSLT to a selection?
Or is there some other means to easily achieve what I'm intending to do that I haven't found yet?
Thomas.
Is transforming an XML snippet, more precisely a selection containing a tree fragment from an XML document, supported?
What I'm looking for is roughly this:
I have an XML file open in the XML Editor which contains some XML markup that I want to transform in-place into some other XML markup. As an example, the following:
Code: Select all
<snippet>
<title>Some name</title>
<data something="foo" thing="bar">some useful data</data>
</snippet>
Code: Select all
<person>
<name>Some name</name>
<fact key="foo"/>
<fact key="bar"/>
</person>
I'm not that familiar with <oXygen/> yet, but from what I understand, a "transformation scenario" could be the right tool, since the above would actually only need some XSLT.
However, I would like to apply the transformation in-place, i.e., I'm imagining the following work-flow:
1) select the XML snippet in the XML Editor
2) invoke the transformation which directly replaces the selected snippet in the currently edited file
(I deliberately wrote "transformation" instead of "transformation scenario," since it seems to me that this kind of work-flow could also be called a "refactoring.")
Is something like this supported by <oXygen/>, applying some XSLT to a selection?
Or is there some other means to easily achieve what I'm intending to do that I haven't found yet?
Thomas.