MACROMEDIA DREAMWEAVER MX 2004-EXTENDING DREAMWEAVER Dokumentacja Strona 45

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 504
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 44
Extensible document types in Dreamweaver 45
<loadstring>myJSPDocType/Description</loadstring>
</description>
or
<description>
<loadstring id="myJSPDocType/Description" />
</description>
In these examples, myJSPDocType/Description is a unique string identifier that acts as a
placeholder for the localized string. The localized string is defined in the next step.
4. In the Configuration/Strings folder, create a new XML file (or edit an existing file) that
defines the localized string. For example, the following code, when placed in the
Configuration/Strings/strings.xml file, defines the
myJSPDocType/Description string:
<strings>
...
<string id="myJSPDocType/Description"
value=
"<![CDATA[JavaServer&nbsp;Page with <em>special</em>
features]]>"
/>
...
</strings>
Rules for document type definition files
Dreamweaver lets document types that are associated with a server model share file extensions.
For example: ASP-JS and ASP-VB can claim .asp as their file extension. (For information on
which server model gets preference, see canRecognizeDocument()” on page 424.)
Dreamweaver does not let document types that are not associated with a server model share
file extensions.
If a file extension is claimed by two document types where one type is associated with a server
model and the other is not, the latter document type gets preference. Suppose you have a
document type called SAM, which is not associated with a server model, that has a file
extension of .sam, and you add this file extension to the ASP-JS document type. When a
Dreamweaver user opens a file that has a .sam extension, Dreamweaver assigns the SAM
document type to it, not ASP-JS.
NOTE
String identifiers, such as myJSPDocType/Description in the previous example, must
be unique within the application. Dreamweaver, when it starts, parses all XML files
within the Configuration/Strings folder and loads these unique strings.
Przeglądanie stron 44
1 2 ... 40 41 42 43 44 45 46 47 48 49 50 ... 503 504

Komentarze do niniejszej Instrukcji

Brak uwag