Specifications
611
dreamweaver.tagLibrary.importDTDOrSchema()
Availability
Dreamweaver MX
Description
Imports a DTD or schema file from a remote server into the Tag Library.
Arguments
File URL: Path to DTD or schema file, in local URL format.
Prefix: The prefix string that should be added to all tags in this tag library.
Returns
Name of the imported tag library.
dreamweaver.tagLibrary.getImportedTagList()
Availability
Dreamweaver MX
Description
Generates a list of TagInfo objects from an imported tag library.
Arguments
Name of imported tag library.
Returns
Array of tagInfo objects.
A
taginfo object contains information about a single tag that is included in the tag library. The
following properties are defined in a
tagInfo object:
• tagName: a string
• attributes: an array of strings. Each string is the name of an attribute that is defined for this
tag.
Example:
// "fileURL" and "prefix" have been entered by the user.
// tell the Tag Library to Import the DTD/Schema
var libName = dw.tagLibrary.importDTDOrSchema(fileURL, prefix);
// get the array of tags for this library
// this is the TagInfo object
var tagArray = dw.tagLibrary.getImportedTagList(libName);
// now I have an array of tagInfo objects.
// I can get info out of them. This gets info out of the first one.
// note: this assumes there is at least one TagInfo in the array.
var firstTagName = tagArray[0].name;
var firstTagAttributes = tagArray[0].attributes;
// note that firstTagAttributes is an array of attributes.