A Simple Attribute Translator Example - Adobe 38040334 - Dreamweaver CS3 User Manual

Extending dreamweaver
Hide thumbs Also See for 38040334 - Dreamweaver CS3:
Table of Contents

Advertisement

A simple attribute translator example

To better understand attribute translation, it's helpful to look at an example. The following translator is Pound
Conditional (Poco) markup, a syntax that's somewhat similar to ASP or PHP.
You create the attribute translator by performing the following steps:
• "Creating the tagspec tag" on page 334
• "Creating the icon" on page 334
• "Creating the attribute translator" on page 334
Creating the tagspec tag
The first step in making this translator work properly is to create a
Dreamweaver from parsing the untranslated Poco statements.
To create the tagspec tag:
Create a new blank file.
1
2
Enter the following:
<tagspec tag_name="poco" start_string="<#" end_string="#>" ¬
detect_in_attribute="true" icon="poco.gif" icon_width="17" ¬
icon_height="15"></tagspec>
3
Save the file as poco.xml in the Configuration/ThirdPartyTags folder.
For an example of creating the
Creating the icon
Next, you create the icon for Poco tags.
To create the icon:
1
Create an image file that is 18 x 18 pixels for the Poco tags icon.
Save the file as poco.gif in the Configuration/ThirdPartyTags folder.
2
Creating the attribute translator
You create an HTML file that contains the functions necessary for the attribute translator.
To create the HTML file:
1
Create a new blank file.
Enter the following:
2
tag, see the Tags.xml file in the Configuration/ThirdPartyTags folder.
tagspec
tag for Poco markup, which prevents
tagspec
DREAMWEAVER CS3
334
Extending Dreamweaver

Advertisement

Table of Contents
loading

This manual is also suitable for:

Dreamweaver cs3

Table of Contents