I would find it useful to be able to change the name of an element and have it change everywhere, in all the start- and end-tags, and not worry if the same string appears somewhere else in the file, as element content, attribute name or attribute value.
Sometimes XSLT is too heavy a tool to do this.
I could envision using similar features that restricted the change to attribute names (within a specific element) or that restricted the change to element content. Or maybe the replace -- gee, I guess it ought to work with just search, too -- would be restricted to element content if tags and attributes were hidden.
I realize these fall in the category of "nice to have" and not "must-have", but these are the kinds of things a plain-text editor would never implement.
Note too that I'm not wanting some simplified XSLT structure -- "change these elements to those elements, reorder this" and so on from a table or menu -- though that would be fine. Just that sometimes I'm fiddling with the content and sometimes with the markup and if the editor can help out on that, it would be, um, helpful.
Thanks,
Roger
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I agree, this would be useful. Do you think regexes would offer a possible interim solution?
s/<(/?)oldelement\b(.*?)>/<\1newelement\2>/g
I appreciate that this may not work for tags spanning several lines, though. (Not sure I'd trust Scintilla's regex engine with this. PCRE should handle this fine.
-Gerald
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I would find it useful to be able to change the name of an element and have it change everywhere, in all the start- and end-tags, and not worry if the same string appears somewhere else in the file, as element content, attribute name or attribute value.
Sometimes XSLT is too heavy a tool to do this.
I could envision using similar features that restricted the change to attribute names (within a specific element) or that restricted the change to element content. Or maybe the replace -- gee, I guess it ought to work with just search, too -- would be restricted to element content if tags and attributes were hidden.
I realize these fall in the category of "nice to have" and not "must-have", but these are the kinds of things a plain-text editor would never implement.
Note too that I'm not wanting some simplified XSLT structure -- "change these elements to those elements, reorder this" and so on from a table or menu -- though that would be fine. Just that sometimes I'm fiddling with the content and sometimes with the markup and if the editor can help out on that, it would be, um, helpful.
Thanks,
Roger
I agree, this would be useful. Do you think regexes would offer a possible interim solution?
s/<(/?)oldelement\b(.*?)>/<\1newelement\2>/g
I appreciate that this may not work for tags spanning several lines, though. (Not sure I'd trust Scintilla's regex engine with this. PCRE should handle this fine.
-Gerald
Well, sure, that's how I'm doing it now anyway.
But if there were a separate dialog, or an option in the dialog (or that Replace panel) that restricted the change, that would be so straightforward.
Not a showstopper, for sure, because of the regex route.