
Chapter 22
538
Each tag database file defines the name, type, content model, rendering scheme,
and icon for one or more custom tags. You can create any number of tag
database files, but all of them must reside in the Configuration/ThirdPartyTags
folder to be read and processed by Dreamweaver. Tag database files have the file
extension .xml.
Tip:
If you are working on several different unrelated sites at once (for example, as a
freelance developer), you can put all the tag specifications for a particular site in one file.
Then simply include that tag database file with the custom icons and Property inspectors
that you hand over to the people who will maintain the site.
You define a tag specification with an XML tag called
tagspec
; for example, the
following code describes the specification for a tag named
happy
:
<tagspec tag_name="happy" tag_type="nonempty"
render_contents="false"
content_model="marker_model" icon="happy.gif" icon_width="18"
icon_height="18"></tagspec>
You can define two different kinds of tags using
tagspec
: normal HTML-style
tags and string-delimited tags. String-delimited tags start with one string and end
with another string; they’re like empty HTML tags (such as
img
) in that they don’t
surround content and don’t have closing tags. The
happy
tag shown above is a
normal HTML-style tag; it starts with an opening
<happy>
tag, contains data
between opening and closing tags, and ends with a closing
</happy>
tag. (If the
tag were a string-delimited tag, the tag specification would include the
start_string
and
end_string
attributes.) An ASP tag is a string-delimited tag;
it starts with the string
<%
and ends with the string
%>
, and it has no closing tag.
The following information describes the attributes and valid values for the
tagspec
tag. Attributes marked with an asterisk (*) are ignored by string-
delimited tags.
<tagspec>
Description
Provides information about a third-party tag.
Attributes
tag_name
,
tag_type
,
render_contents
,
content_model
,
start_string
,
end_string
,
detect_in_attribute
,
parse_attributes
,
icon
,
icon_width
,
icon_height
tag_name
The name of the custom tag. (For string-delimited tags,
tag_name
is
used only to determine whether a given Property inspector can be used for the tag.
If the first line of the Property inspector contains this tag name with an asterisk on
each side, then the inspector can be used for tags of this type. For example, the tag
name for ASP code is
ASP
; Property inspectors that can examine ASP code should
have
*ASP*
on the first line. For information on the Property inspector API, see
“Property Inspectors” in
Extending Dreamweaver
.)
Содержание 38028779 - Macromedia Dreamweaver - Mac
Страница 1: ...macromedia Using Dreamweaver...
Страница 148: ...Chapter 4 148...
Страница 296: ...Chapter 12 296...
Страница 472: ...Chapter 18 472...
Страница 512: ...Chapter 21 512...
Страница 562: ...Appendix 562...