Using Tokens in Conceptual Content Topics

Sep 5, 2012 at 3:49 PM

Hi

I have created a tokens file that contain my commonly used maml snippets. one of my tokens named "TroubleshootingMenu" has the below syntax:

<content xmlns:xlink="http://www.w3.org/1999/xlink">
    <alert class="note">
        <para>
            // Some Text here ....
        </para>
    </alert>
</content>

Inside any conceptual content topic, i am referencing the token item:

<list class="ordered">
    <listItem>
        <token>TroubleshootingMenu</token>
     </listItem>
 </list>

But after build and in the chm, it is showing the token item with no styles, i.e. my token appears in the topic as ordinary text and not a note.

Can anyone help please ?

                    	
Editor
Sep 5, 2012 at 4:13 PM

All MAML elements in a token need to be prefixed with the "ddue:" namespace.  In addition, your token file does not appear to have a valid format.  Each token needs to be in an <item> element like this:

<?xml version="1.0" encoding="utf-8"?>
<content xml:space="preserve"
  xmlns:ddue="http://ddue.schemas.microsoft.com/authoring/2003/5"
  xmlns:xlink="http://www.w3.org/1999/xlink">

    <item id="TroubleshootingMenu">
      <ddue:alert class="note">
        <ddue:para>
            // Some Text here ....
        </ddue:para>
      </ddue:alert>
    </item>

</content>

Eric

 

Sep 6, 2012 at 10:40 AM

thanks Eric, 

that worked for me.