"Eclipse plug-in Development" based on WTP development of custom JSP editors (10)

Source: Internet
Author: User
Tags tld

Introduction to WTP TLD content model

In the previous series, we have analyzed the syntax document (istructureddocument) and semantic documnt of WTP (Icssdocument or idomdocument) and Istructuredmodel that are closely related to the two, and on this basis the structuredtexteditor provided by the WTP is partially customized.

The question arises, are all the information we want contained in Istructureddocument, Idomdocument (icssdocument) or Istructuredmodel? No. For example, if we need to access the related information for the previous graph JSP document TLD (for example, to determine how a particular tag used in the current JSP document is declared in the TLD and how the TLD that the current JSP document wants to associate is defined 、、、), these Information is not placed directly in the grammar document (istructureddocument) or semantic document (Idomdocument or icssdocument). In addition to TLD-related information, we need to have other descriptive information, all of which can be considered metadata information, WTP it as content model (literal translation is ^_^). In this section we introduce a content model: the TLD content Model (TLD), and in the following sections, we develop an auto edit policy (auto Edit strategy) based on the TLD content model described in this section.

"TLD Content Document"

The so-called TLD Content document can literally be guessed as a description of a TLD. So let's look at a TLD definition file first:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.1//EN" "http://java.sun.com/j2ee/dtds/web- jsptaglibrary_1_1.dtd">
<taglib>
<tlibversion>1.0</tlibversion>
<jspversion>1.0</jspversion>
<shortname>test1</shortname>
<uri>http://www.blogjava.net/zhuxing/tags/test1</uri>
<tag>
<name>test</name>
<tagclass>any</tagclass>
<bodycontent>empty</bodycontent>
<attribute>
<name>scope</name>
<required>true</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
</tag>
</taglib>

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.