A few handy features for the XSLT editor
Are you missing a feature? Request its implementation here.
-
- Posts: 6
- Joined: Thu Dec 04, 2008 7:52 pm
A few handy features for the XSLT editor
Hi OxygenXML Team,
Being new to XSLT, I have just been evaluating Stylus Studio, AltovaXML, and Oxygen for XSLT development, and I have to say: you're the clear winner. Good job! Of course, not everything is perfect, and coming from java development, there's still a big gap. Here's a bunch a features I'd like to have. I apologize if some of them already exist but that I did not find them.
*[very important] An eclipse-like "quick-outline". I should be able to type CTRL+O, and then have a pop-up list of top-level elements (global variables, templates, functions) to which I can jump to by typing the first few letters of the name and/or matching pattern. It's a million time faster to navigate that way than to search in the outline and double-click on the element you want.
* Prefixed tags can have a specific color, but the bold/italic attributes cannot be configured. I'd really like the xsl: elements not to be in the same weight than the output nodes, because there are of such different nature.
* An eclipse-like "Quick-fix". When I call a function or a template that doesn't exist, I wish I could press CTRL+1 and have it created. If the function call is in the 'select' attribute of a xsl:variable that has a 'as' attribute, then this 'as' attribute should be copied to the newly created function.
* Currently, CTRL+I to correct indentation works only when several lines are selected. If this is not the case, CTRL+I currently does nothing. Instead, I think it should indent all the lines corresponding to the immediately enclosing element.
* Type auto-completion. In a "as" attribute for example, it you type "as:in" and then CTRL+SPACE, I'd like to be able to select "xs:int" and "xs:integer". Same thing for types such as "node()",...
* Block comment. Currently, if you select a few lines of codes that contains a comment and press CTRL+/, oxygen naively adds and <!-- and a --> at the beginning and at the end of the selected code. Instead, it should add as many pairs as necessary so that the commented section is valid.
Well, that's quite a few features requests. Thanks for considering them, and keep on the good job!
Being new to XSLT, I have just been evaluating Stylus Studio, AltovaXML, and Oxygen for XSLT development, and I have to say: you're the clear winner. Good job! Of course, not everything is perfect, and coming from java development, there's still a big gap. Here's a bunch a features I'd like to have. I apologize if some of them already exist but that I did not find them.
*[very important] An eclipse-like "quick-outline". I should be able to type CTRL+O, and then have a pop-up list of top-level elements (global variables, templates, functions) to which I can jump to by typing the first few letters of the name and/or matching pattern. It's a million time faster to navigate that way than to search in the outline and double-click on the element you want.
* Prefixed tags can have a specific color, but the bold/italic attributes cannot be configured. I'd really like the xsl: elements not to be in the same weight than the output nodes, because there are of such different nature.
* An eclipse-like "Quick-fix". When I call a function or a template that doesn't exist, I wish I could press CTRL+1 and have it created. If the function call is in the 'select' attribute of a xsl:variable that has a 'as' attribute, then this 'as' attribute should be copied to the newly created function.
* Currently, CTRL+I to correct indentation works only when several lines are selected. If this is not the case, CTRL+I currently does nothing. Instead, I think it should indent all the lines corresponding to the immediately enclosing element.
* Type auto-completion. In a "as" attribute for example, it you type "as:in" and then CTRL+SPACE, I'd like to be able to select "xs:int" and "xs:integer". Same thing for types such as "node()",...
* Block comment. Currently, if you select a few lines of codes that contains a comment and press CTRL+/, oxygen naively adds and <!-- and a --> at the beginning and at the end of the selected code. Instead, it should add as many pairs as necessary so that the commented section is valid.
Well, that's quite a few features requests. Thanks for considering them, and keep on the good job!
-
- Posts: 4141
- Joined: Fri Mar 28, 2003 2:12 pm
Re: A few handy features for the XSLT editor
Post by sorin_ristache »
Hello,
Regards,
Sorin
Version 10.1 will include a type of Outline view specific for XSL stylesheets where you can select quickly a template or a variable for moving the cursor to it. The current Outline view is not very useful for XSL stylesheets.luchm wrote:*[very important] An eclipse-like "quick-outline". I should be able to type CTRL+O, and then have a pop-up list of top-level elements (global variables, templates, functions) to which I can jump to by typing the first few letters of the name and/or matching pattern. It's a million time faster to navigate that way than to search in the outline and double-click on the element you want.
You can configure a different color for elements that have the xsl: prefix or other prefix from Options -> Preferences -> Editor -> Colors -> Elements by Prefix.luchm wrote:* Prefixed tags can have a specific color, but the bold/italic attributes cannot be configured. I'd really like the xsl: elements not to be in the same weight than the output nodes, because there are of such different nature.
I logged your request for a future version.luchm wrote:* An eclipse-like "Quick-fix". When I call a function or a template that doesn't exist, I wish I could press CTRL+1 and have it created. If the function call is in the 'select' attribute of a xsl:variable that has a 'as' attribute, then this 'as' attribute should be copied to the newly created function.
The indent action should be applied up to what ancestor element? I think in the general case that is not clear.luchm wrote:* Currently, CTRL+I to correct indentation works only when several lines are selected. If this is not the case, CTRL+I currently does nothing. Instead, I think it should indent all the lines corresponding to the immediately enclosing element.
I added them as enhancement requests.luchm wrote:* Type auto-completion. In a "as" attribute for example, it you type "as:in" and then CTRL+SPACE, I'd like to be able to select "xs:int" and "xs:integer". Same thing for types such as "node()",..
* Block comment. Currently, if you select a few lines of codes that contains a comment and press CTRL+/, oxygen naively adds and <!-- and a --> at the beginning and at the end of the selected code. Instead, it should add as many pairs as necessary so that the commented section is valid.
Regards,
Sorin
-
- Posts: 6
- Joined: Thu Dec 04, 2008 7:52 pm
Re: A few handy features for the XSLT editor
Hi Sorin, and thanks for your reply.
* If the cursor is on a line that starts with anything but a closing tag, find the element containing the first item occurring on the current line, and indent the lines corresponding to the content of that element. The opening tag of that element would not be moved; its closing tag would be aligned.
* If the cursor is on a line that starts with a closing tag, indent all the lines corresponding to the content of the element being closed, and align the closing tag with the opening one.
In all case, any rule about what to indent, even if it is somewhat arbitrary, is better than not doing anything.
Regards,
Yes, I know that, hence my request: since we can configure color, it would be nice to be able to configure font weight too.* Prefixed tags can have a specific color, but the bold/italic attributes cannot be configured. I'd really like the xsl: elements not to be in the same weight than the output nodes, because there are of such different nature.You can configure a different color for elements that have the xsl: prefix or other prefix from Options -> Preferences -> Editor -> Colors -> Elements by Prefix.
I would suggest the following:* Currently, CTRL+I to correct indentation works only when several lines are selected. If this is not the case, CTRL+I currently does nothing. Instead, I think it should indent all the lines corresponding to the immediately enclosing element.The indent action should be applied up to what ancestor element? I think in the general case that is not clear.
* If the cursor is on a line that starts with anything but a closing tag, find the element containing the first item occurring on the current line, and indent the lines corresponding to the content of that element. The opening tag of that element would not be moved; its closing tag would be aligned.
* If the cursor is on a line that starts with a closing tag, indent all the lines corresponding to the content of the element being closed, and align the closing tag with the opening one.
In all case, any rule about what to indent, even if it is somewhat arbitrary, is better than not doing anything.
Regards,
-
- Posts: 4141
- Joined: Fri Mar 28, 2003 2:12 pm
Re: A few handy features for the XSLT editor
Post by sorin_ristache »
We will consider it for a future version.luchm wrote:Yes, I know that, hence my request: since we can configure color, it would be nice to be able to configure font weight too.
I would expect to align and indent both the opening tag and the closing tag of that element. Why indenting only the closing tag if the opening tag is not indented correctly (according to the indent size set in Preferences)?luchm wrote:I would suggest the following:
* If the cursor is on a line that starts with anything but a closing tag, find the element containing the first item occurring on the current line, and indent the lines corresponding to the content of that element. The opening tag of that element would not be moved; its closing tag would be aligned.
* If the cursor is on a line that starts with a closing tag, indent all the lines corresponding to the content of the element being closed, and align the closing tag with the opening one.
Regards,
Sorin
-
- Posts: 2
- Joined: Mon Dec 08, 2008 4:32 pm
Re: A few handy features for the XSLT editor
One more feature request: since we can configure color in tags by prefix, it would be nice also to be able to configure color (and maybe font style too) in attributes by prefix.sorin wrote:We will consider it for a future version.luchm wrote:Yes, I know that, hence my request: since we can configure color, it would be nice to be able to configure font weight too.
Something like this: <img custom-prefix:attribute="value" src="somepic.png" />
-
- Posts: 4141
- Joined: Fri Mar 28, 2003 2:12 pm
Re: A few handy features for the XSLT editor
Post by sorin_ristache »
princed wrote:One more feature request: since we can configure color in tags by prefix, it would be nice also to be able to configure color (and maybe font style too) in attributes by prefix.
Do you mean extending the color set for the elements with a prefix p (Preferences -> Editor -> Colors -> Elements by Prefix) to the attributes with the same prefix and renaming the option from Elements by Prefix to Elements and Attributes by Prefix?
Using one color for the elements with prefix p and other color for the attributes with prefix p does not highlight the namespace with the prefix p so I do not see how it can be useful.
Regards,
Sorin
-
- Posts: 6
- Joined: Thu Dec 04, 2008 7:52 pm
Re: A few handy features for the XSLT editor
Sure, why not. Again, I believe that what the details of the rule are is less important that the fact that there is a rule.sorin wrote:I would expect to align and indent both the opening tag and the closing tag of that element. Why indenting only the closing tag if the opening tag is not indented correctly (according to the indent size set in Preferences)?luchm wrote:I would suggest the following:[...]
Regards,
Sorin
Regards.
-
- Posts: 2
- Joined: Mon Dec 08, 2008 4:32 pm
Re: A few handy features for the XSLT editor
Yes, because ...sorin wrote: Do you mean extending the color set for the elements with a prefix p (Preferences -> Editor -> Colors -> Elements by Prefix) to the attributes with the same prefix and renaming the option from Elements by Prefix to Elements and Attributes by Prefix?
... you're right.sorin wrote: Using one color for the elements with prefix p and other color for the attributes with prefix p does not highlight the namespace with the prefix p so I do not see how it can be useful.
And I'm think in this way it will be useful

-
- Posts: 63
- Joined: Fri Dec 12, 2003 6:34 pm
- Contact:
Re: A few handy features for the XSLT editor
Post by iulian_velea »
Hello,
We finished implementing the feature related to the "Toggle comments" operation. Now, the action takes into account comments already present in the document. It will be available in the upcoming Oxygen release and it works not only for XML documents but also for other types of documents that accept multiline comments (CSS, JavaScript, SQL).
Cheers,
Iulian
We finished implementing the feature related to the "Toggle comments" operation. Now, the action takes into account comments already present in the document. It will be available in the upcoming Oxygen release and it works not only for XML documents but also for other types of documents that accept multiline comments (CSS, JavaScript, SQL).
Cheers,
Iulian
-
- Posts: 9473
- Joined: Fri Jul 09, 2004 5:18 pm
Re: A few handy features for the XSLT editor
You will aslo be able to customize colors by prefix for attribute names starting from Oxygen 11 (couple of weeks).princed wrote: One more feature request: since we can configure color in tags by prefix, it would be nice also to be able to configure color (and maybe font style too) in attributes by prefix.
Something like this: <img custom-prefix:attribute="value" src="somepic.png" />
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ Artificial Intelligence (AI Positron Assistant add-on)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service