cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

friendly names on elements and attributes

douglaswade1
1-Newbie

friendly names on elements and attributes

To all:

I thought I recall when I took the FOSI class (or another) from PTC ten
years or so ago, that I could rename the attributes names to a user
friendly in the editor. I want to rename an attribute of S2bS0 to something
the writer understands. I want Epic to use the right value, but the writer
sees something nicer. I just do not remember.

d
9 REPLIES 9

You want an alias map.

Save this as doctypename.alias in your doctype's doctype directory where
doctypename = your doctype's name.

Also ... I only do this for elements, so I'm not sure what the variation is
for attributes.



"aliasmap.dtd">
<alias-map>
<element-list>
<element>
<name>dtdname</name><alias>friendlyname</alias>
</element>
</element-list>
</alias-map>

I have never played with aliases. Does the FOSI use e-i-c's for the <name> or for the <alias>?

Did the same guy who dreamed up the attribute name of "S2bS0" also come up with a hotkey combination of CTRL-ALT-F1-DELETE?

According to the aliasmap DTD, instead of <element-list> you put the attribute names in <global-attribute-list> and then <global-attribute> tags contain <name> followed by <alias>, just like the <element> tag.

The e-i-c represents the name, so:
<element><name>para</name><alias>pa</alias></element> Will show <pa>
tags in the editor when the source XML says <para>.

I also have not used attribute aliases, but I see some old ones in our
.alias file such as this:
<attribute-list><attribute><name>file_id</name><alias></alias></attribute>

And this goes after the name/alias pair within the element tag.

Finally, you can explicitly set the name of your alias file in your
instance.acl (or othewise) by using set:

set aliasmap=xyz;

Where xyz is a file called xyz.alias

- keith

My FOSIs do not reference the alias but that doesn't mean it can't. To be
clear, I'm not saying that it can, I don't know. My *guess* is that the
FOSI or Styler stylesheet can only use the DTD name.

I checked. When you click after an aliased tag and start a FOSI style panel for it, the e-i-c that is displayed is for the original tag name, not the alias.

Now I need to find a place in my book to add this note.

Suzanne Napoleon
www.FOSIexpert.com
"WYSIWYG is last-century technology!"


Thanks, Suzanne. Good to know.

To All,


Regardless of how you create an alias file for a particular DTD, this is what you can expect: the Editor is the only place you will see the alias naming. Any other tool or programthat deals with a particular DTD structure will use the coded name of the element or attribute that is defined within that DTD.


Alias files are used by Arbortext Editor for the convienence of the author. You can do a variety of renaming for any element, it's attributes, or any one attribute for all elements. For example, <desc> can be displayed as <description> or a <color> element that has a "value" attribute with choices of 0-9 can have the choices of 'black, red, blue, etc.".


However, I repeat... this renaming is ONLY on the Editor screens. If you edit the selection to look at the raw SGML/XML, or you look at the saved document outside the Editor, you will see the original DTD naming used.


Hope this Helps,


Bob

Announcements