<html><head><META http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Content Assist</title><meta content="DocBook XSL Stylesheets V1.74.0" name="generator"><link rel="home" href="../index.html" title="XSL Tools User Documentation"><link rel="up" href="xsleditor.html" title="Chapter 2. XSL Editing"><link rel="prev" href="xsleditor.html" title="Chapter 2. XSL Editing"><link rel="next" href="xsleditor_templates.html" title="Templates"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="ContentAssist"></a>Content Assist</h2></div></div></div><p> | |
XSL Tools extends the existing content assistance support of the | |
XML Editor to provide content assistance for | |
several XSL namespace | |
attributes. The content assistance provided covers the available XPath | |
statements as | |
defined in the | |
<span class="emphasis"><em>XPath Templates</em></span> | |
preference page. | |
</p><div class="important" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">XPath 2.0 Support</h3><p> | |
Currently XPath 2.0 is not supported directly. However, a user | |
can add this support if they need it by | |
adding the missing XPath | |
functions to the XPath Templates. | |
</p></div><p> | |
To initiate content assistance press CTRL + SPACE or CMD + SPACE. This will bring up | |
a dialog that will contain any proposals that are available. If no proposals are available | |
an message will be displayed in the status bar. | |
</p><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="SelectTest"></a>Select and Test Attributes </h3></div></div></div><p> | |
Where ever an xsl element supports a | |
<span class="emphasis"><em>select</em></span> | |
or | |
<span class="emphasis"><em>test</em></span> | |
attribute, content assistance is | |
available. This includes support for | |
the following: | |
</p><div class="itemizedlist"><p class="title"><b>Select and Test Assistance</b></p><ul type="disc"><li><p> | |
<span class="emphasis"><em>Variables</em></span> | |
- both local and global variables are supported within the current | |
stylesheet. Any local or global | |
variable will be | |
added to the list | |
and the name is prefixed with a dollar sign $ symbol. | |
</p></li><li><p> | |
<span class="emphasis"><em>XPath 1.0</em></span> | |
- XPath 1.0 is supported through the use of templates. All of the | |
XPath 1.0 and XSLT xpath | |
extension | |
functions are available, as well | |
as | |
<span class="emphasis"><em>axis</em></span> | |
operations. Currently XPath 2.0 is not supported | |
directly, but will | |
be added in the future. | |
</p></li></ul></div><p> | |
Content assistance for the select and test attributes is | |
intelligent enough to know that it is within an | |
XPath expression, and will try to determine and provide content assistance based on the | |
current cursor | |
position. If a word has been partially typed it will | |
filter the available assistance. | |
</p></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="ExcludeResultPrefixesContentAssist"></a>Exclude-Result-Prefixes</h3></div></div></div><p> | |
The | |
<span class="emphasis"><em>exclude-result-prefixes</em></span> | |
attribute in both XSLT 1.0 and XSLT 2.0 allows for the exclusion of | |
certain namespace | |
declarations in the | |
output document. The content | |
assistance populates a list of available namespaces that have been | |
defined in | |
the | |
stylseheet and provides them as proposals as shown in | |
<a class="xref" href="xsleditor_contentassist.html#fig_ExcludeResultPrefixesContentAssist1" title="Figure 2.1. Exclude-result-prefixes Content Assistance">Figure 2.1, “Exclude-result-prefixes Content | |
Assistance”</a> | |
. | |
</p><div class="figure"><a name="fig_ExcludeResultPrefixesContentAssist1"></a><p class="title"><b>Figure 2.1. Exclude-result-prefixes Content | |
Assistance</b></p><div class="figure-contents"><div class="mediaobject" align="center"><img src="../images/editor/ExcludeContentAssist1.png" align="middle" alt="Exclude-result-prefixes Content Assistance"></div></div></div><br class="figure-break"><p> | |
If the attribute has no values defined, then the | |
<span class="emphasis"><em>#all</em></span> | |
value will be available in the list. If #all | |
is already in the | |
attributes value, then no content assistance | |
will be available. | |
</p><div class="figure"><a name="fig_ExcludeResultPrefixesContentAssist2"></a><p class="title"><b>Figure 2.2. Filtered exclude-result-prefixes proposals</b></p><div class="figure-contents"><div class="mediaobject" align="center"><img src="../images/editor/ExcludeContentAssist2.png" align="middle" alt="Filtered exclude-result-prefixes proposals"></div></div></div><br class="figure-break"><p> | |
Content assistance is intelligent enough to know when a | |
namespace prefix is already in the list of | |
excluded namespaces. In | |
this | |
case it will not show the namespace in the proposal list. | |
</p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Why isn't the XSL Namespace prefix in the proposals? | |
</h3><p> | |
Currently the xsl prefix or any prefix that uses the XSL | |
namespace is excluded from the list. This may | |
be changed at | |
a future | |
date. This will depend on user feedback. | |
</p></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="ed_ModeAssist"></a>Mode attribute assistance</h3></div></div></div><p> | |
Content assistance is available for those xsl elements that support the mode attribute. For XSLT 1.0 | |
these elements are <span class="emphasis"><em>template</em></span>, <span class="emphasis"><em>apply-templates</em></span>, and <span class="emphasis"><em>apply-imports</em></span>. | |
</p><div class="figure"><a name="fig_ModeAssistance"></a><p class="title"><b>Figure 2.3. Mode attribute assistance</b></p><div class="figure-contents"><div class="mediaobject" align="center"><img src="../images/editor/modeAssistance.png" align="middle" alt="Mode attribute assistance"></div></div></div><br class="figure-break"><p> | |
The proposal list is populated by those modes defined on templates in the current stylesheet, and any | |
of the templates that are <span class="emphasis"><em>included</em></span> or <span class="emphasis"><em>imported</em></span>. | |
</p></div></div></body></html> |