448
Data Translators
* markup to be translated, the regular expressions that *
* a document containing the markup to be translated *
* would match (whether the translator should run on all *
* files, no files, in files with the specified *
* extensions, or in files matching the specified *
* expressions). *
**********************************************************/
function getTranslatorInfo(){
//Create a new array with 6 slots in it
returnArray = new Array(6);
returnArray[0] = "DREAMWEAVER_TEAM"// The translatorClass
returnArray[1] = "Kent Tags"// The title
returnArray[2] = "0" // The number of extensions
returnArray[3] = "1"// The number of expressions
returnArray[4] = "<kent"// Expression
returnArray[5] = "byExpression"// run if the file contains "<kent"
return returnArray;
}
/
*********************************************************************
*****
* The translateMarkup() function performs the actual translation.
*
* In this translator, the translateMarkup() function is written
*
* entirely in JavaScript (that is, it does not rely on a C library) --
*
* and it's also extremely inefficient. It's a simple example, however,
*
* which is good for learning. *
************************************************************************
**/
function translateMarkup(docNameStr, siteRootStr, inStr){
var outStr = ""; // The string to be returned after
translation
var start = inStr.indexOf('<kent>'); // The first position of the
KENT tag
// in the document.
var replCode = replaceKentTag(); // Calls the replaceKentTag()
function
// to get the code that will replace
KENT.
var outStr = ""; // The string to be returned after
translation
//If the document does not contain any content, terminate the
translation.
if ( inStr.length <= 0 ){
Содержание DREAMWEAVER 8-EXTENDING DREAMWEAVER
Страница 1: ...Extending Dreamweaver...
Страница 8: ...8 Contents...
Страница 14: ...14 Introduction...
Страница 16: ......
Страница 54: ...54 Customizing Dreamweaver...
Страница 96: ...96 Customizing Code View...
Страница 98: ......
Страница 110: ...110 Extending Dreamweaver...
Страница 138: ......
Страница 166: ...166 Insert Bar Objects...
Страница 180: ...180 Commands...
Страница 248: ...248 Toolbars...
Страница 260: ...260 Reports...
Страница 278: ...278 Tag Libraries and Editors...
Страница 288: ...288 Property Inspectors...
Страница 378: ...378 Server Behaviors...
Страница 398: ...398 Data Sources...
Страница 432: ...432 Server Models...
Страница 456: ...456 Data Translators...
Страница 482: ......
Страница 492: ...492 The Shared Folder...