Arbortext IsoDraw > User's Reference > Menus > Objects Menu > Select DTD > Defining your Own DTD
  
Defining your Own DTD
It is generally advisable to save non-graphical information outside the illustration, e.g. in a database or a separate XML file for use on the Internet. It may be useful, however, to generate a file containing all attributes which is then not dependent on other files.
It will be adequate in most cases to attach additional attributes to the standard object type Graphical object. The following example shows how you can derive your own DTD from one of the existing DTDs.
First, look for the folder containing your DTDs (see Preferences). Then copy file grexchange.dtd. Give the copied file the name sample.dtd. Then open this file with a word processing program. The first lines will look as follows:
<!— ATA GREXCHANGE 2.6 Model —>

<!-***********************************************
This is the GREXCHANGE DTD. Do not modify or rename
this file! If you want to use this DTD as a
starting point for your own DTD make a copy and
give the copy a different name.
The new name must not contain the words GREXCHANGE
or WebCGM.
**************************************************
**

—>
Change the term ATA GREXCHANGE in the first line to Sample so that this DTD is not accidentally confused with the GREXCHANGE DTD. Then scroll to the end of the file where you will find the following definition:
<!ELEMENT grobject (grobject)*>
<!ATTLIST spare part
%defAttrs;
refloc %String; #IMPLIED
>
Delete the following line:
refloc %String; #IMPLIED
It may be the case that other attributes are also listed if the GREXCHANGE standard was modified. You can also delete these attributes. You now have a DTD which only contains the minimum definition for the Graphical object. Add your own attributes as required:
<!ATTLIST spare part
%defAttrs;
PartNo %string; #IMPLIED
Quantity %integer; #IMPLIED
Assembly uri #IMPLIED
>
You have now defined three additional attributes. Save the file as a pure text file. Now start Arbortext IsoDraw and select the Select DTD command. If you have done everything correctly, the sample DTD will appear in the list. Select this DTD and confirm with OK. The new attributes will appear if you now call up the object info for an element.