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>