Community
Participate
Working Groups
Typically in an XSLT editor, if one is in one of the XSL attributes like @select, XPath content assist is available. Also, any previously defined or global variables/params are also available in the content assist proposal. For templates, when creating a named templated, if any xsl:call-templates statements have been created and not defined, those names are available as content assist to be filled in for the @name attribute. For match templates, content assist for the various XPath or node operators are available in the editor. Where possible we should provide as much hints for filling out XSL attributes with content assist proposals, specifically where XPath is involved.
Working on ability to add basic support for select attributes. The first support will be to allow for a suggestion of XPath functions to be added. This will leverage Xalan API to obtain a list of available functions.
Added some very basic support for the select statement to provide some hints of available XPath statements. This support will be refactored and modified over the coming weeks. Currently it just provides a list of availabe XPath 1.0 statements, and doesn't go into what paramaters are available or any additional semenatic information about the xpath function. Future enhancements for select will be to include: 1. Variables that have been predefined and are in scope. Including global paramaters and variables, as well as locally scoped variables. 2. axis items, including ancestor:: parent:: self::, etc. These similar items should be applied to the @test attributes.
Created a new Preference page under the XSL Category. This is called XPath Templates. It holds the predefined XPath and Axis methods. It reads the predefined functions from the appropriate xml file. Users may add their own custom defined functions as well. This will be used to help enhance the content assistance on various XSL attributes. Some code from the bpel project may be leveraged as well. This code has been imported into the XSL ui project, but may not stay depending on how useful it ends up being.
jesper I'm ccing you on this since you expressed interest in the XPath content assistance support. We may need a xsl.common.ui to hold this type of stuff that can go across the XPath Views and the XSL Editing support in the editor. Right now I'm just shooting to get the built in editor support functioning and then we can refactor it with appropriate unit tests.
Support has now been added to handle Global Variables as well as locally scoped variables. There is one issue that is happening with the locally scoped variables. It is getting all the variables that are within the ancestor template. This needs to be filtered so that none of the descendant variables are scoped. The match attribute as well has support for xpath statements and axis content assist.
Fixed issue with variable proposals and completion where the cursor was not being placed correctly so that it would appear right after the place where the variable was inserted. This allows variables to be inserted into the middle of a string. Also, added the ability to support XSL's ability to insert value-of selections within an attribute by using "{ }" within the attribute. When a { is found within the attribute, content assistance is available for variables, axis, and xpath statements. An example would be: <xsl:template match="/"> <html> <body bgcolor="{$color}"> <xsl:value-of select="$text"/> </body> </xsl:template> Content assistance is available for XSL and XPath expressions that can be inserted into the bgcolor attribute. It only works if there is a { within the attribute text. This is in addition to any of proposals that are also valid for that particular element.
The initial support for XSL Content assistance on attributes is implemented so I'm going to close this for now. There are additional areas for content assistance support including the name and mode attributes on templates, apply-templates, and call-templates. Those items will have separate bugs opened as enhancements.
resolving this for 0.5m6, additional content assistance should be opened as enhancements.
Mass Migration to wtp.inc.xsl
mass update to 3.1 target due to movement from wtp incubator to wtp source editing lost the original milestones.