Community
Participate
Working Groups
It would be nice to have the ability to hover over a parameter and click on it to take you to its declaration.
Mass Migration to wtp.inc.xsl
Actually, this might not work that well due to the fact that not all variables need to be declared in a stylesheet if that stylesheet is included into another stylesheet (variables with 'tunnel' scope).
(In reply to comment #2) > Actually, this might not work that well due to the fact that not all variables > need to be declared in a stylesheet if that stylesheet is included into another > stylesheet (variables with 'tunnel' scope). > Correct, the tunnelling would only work one way, within the scope of the current stylesheet or any includes/imports it has. No different than how the Templates are handled right now. It would mean that the model would need to keep track of which stylesheet the variable are defined. Not saying it would be easy, but the model would need to be enhanced eventually. In the mean time, just having the ability to hyperlink to the variables within the currently defined stylesheet would be helpful. Most of the stylesheets I've seen are self contained, rarely do you get monsters like the DocBook stylesheets that use lots of includes and imports.
At the moment the model handle global variables only, but it should be easy enough to extend to local variables too. I'll take a look at it.
I've updated the model so that it understands local parameters. As for hyperlinking - this is only useful inside and XPath expression - so Dave maybe its best for you to tacke this?
Actually, hyperlinking will be useful when I get to adding content assistance on xsl:with-param variables, as hyperlinking to them to see what the default names are and values can be useful during development. I'll try and code something probably in M3 for this.
starting to review this.
Added some initial unit tests for the existing functionality.
Added the ability to hyperlink for xsl:with-param name attributes...so items like: <xsl:with-param name="date" select="."/> will hyperlink to the template that defines Date and to the line that the parameter is defined.
This may need to be rethought for how to correctly do this for variables used in XPath statements. The reason being is that we currently don't have each XPath item in it's own region, thus the region we are being passed in the hyperlinkRegion is the starting Offset of the attribute region, not where the mouse pointer may necessarily be. Unfortunately we need this actual position so that we can parse the XPath and then determine where the variable token is stored and what position it is in the xpath statement. I have this working for the xsl:with-param statements, but that is fine as it returns the complete value, and no parsing has to be done in that case. I may close this bug, and open a new bug for the XPath variables hyperlinks, after giving it some over night thought.
Closing this as the original request is finished...you can hyperlink from with-param entries back to the original param declartion in the declaring template. I'll open a second bugzilla for the enhancement to go hyperlink in variables defined in XPath statements.
mass update to 3.1 target due to movement from wtp incubator to wtp source editing lost the original milestones.