Skip to main content



      Home
Home » Language IDEs » ServerTools (WTP) » XML template behaviour
XML template behaviour [message #201779] Wed, 10 October 2007 23:57 Go to next message
Eclipse UserFriend
Hello,

If I define a template in XML Files then the behaviour is that the shortcut
will not be replaced but the template is added:

Example:

I would like to define the following template:

<para>
<programlisting>

<xi:include xmlns:xi="http://www.w3.org/2001/XInclude"

parse="text" href="../examples/${cursor}" />

</programlisting>

</para>



I can not define for example: <pl> as a template as then the result of this
template would be:

<pl> <para>
<programlisting>

<xi:include xmlns:xi="http://www.w3.org/2001/XInclude"

parse="text" href="../examples/${cursor}" />

</programlisting>

</para>

Java templates replace the orginal string. Is there a way to do this also in
XML Files templates or shall I post a feature request for this?

Best regards, Lars
Re: XML template behaviour [message #201926 is a reply to message #201779] Thu, 11 October 2007 15:46 Go to previous message
Eclipse UserFriend
Lars Vogel wrote:
> Hello,
>
> If I define a template in XML Files then the behaviour is that the shortcut
> will not be replaced but the template is added:
>
> Example:
>
> I would like to define the following template:
>
> <para>
> <programlisting>
>
> <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
>
> parse="text" href="../examples/${cursor}" />
>
> </programlisting>
>
> </para>
>
>
>
> I can not define for example: <pl> as a template as then the result of this
> template would be:
>
> <pl> <para>
> <programlisting>
>
> <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
>
> parse="text" href="../examples/${cursor}" />
>
> </programlisting>
>
> </para>
>
> Java templates replace the orginal string. Is there a way to do this also in
> XML Files templates or shall I post a feature request for this?

Lars, the XML Templates will replace the existing tag, the problem is
that you are using what looks like to be xml tag as your template name.
If you just had pl with out the < and > surrounding it, and then used
CTRL+SPACE to bring up the proposed templates, it will replace the
template text.

Because what you typed could be the start of a valid tag, it doesn't
replace it but inserts your code.

You may want to report it as a feature or bug fix request. But I
believe it does work as it was designed too.

Dave
Previous Topic:duplicate jar entry error
Next Topic:Publishing in WTP 2.0.x vs WTP 1.5.x
Goto Forum:
  


Current Time: Fri Jun 06 23:04:40 EDT 2025

Powered by FUDForum. Page generated in 0.02661 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top