[Date Prev][Date Next] [Thread Prev][Thread Next]
[Date Index] [Thread Index] [New search]

Re: Unique ID Attribute within FM for XML output



>
>We have FrameMaker+SGML 5.5.6, and WebWorks Publisher 2000 on an NT 
>4.0 (service pack 6) box.
>
>We are producing documentation in XML format.
>What we want to be able to do is to define our own Unique ID 
>Attribute within FrameMaker. Currently we are just getting the 
>system generated one.
>This is done within WebWorks Publisher with the Style/Paragraph 
>command <Heading1 ID="$AUTOTAG;">
>
>Example of our output is:
>
><XML>
><ChapterTitle ID="1060635">
>   Create Sales Account
></ChapterTitle>
><Heading1 ID="1060687">
>   Purpose of this Task
></Heading1>
></XML>
>
>
>What we would like to is something like:
><XML>
><ChapterTitle ID="ChapterTitle-CreateSalesAccount">
>   Create Sales Account
></ChapterTitle>
><Heading1 ID="CreateSalesAccount-Heading1-PurposeOfThisTask">
>   Purpose of this Task
></Heading1>
></XML>
>
>
>How do we Setup Attributes for a paragraph, and then how do we use 
>them within WebWorks?

If the chapter title in the FM file is the same as the ID you want, 
then this is relatively simple. You just write a macro in WWP that 
looks something like this:

<Heading1 ID="Chapter Title-$DATA;">

But if the heading itself doesn't always match the ID (they do in the 
example you supplied), then you'll need to do a little more work.

First, create a custom marker type. You might call it UniqueID.

At each location where you want a unique ID attribute, insert a 
custom marker with the appropriate text.

Then, map the UniqueID marker type to a new marker style in WWP that 
looks like this:

@SET_ATTR(ID_$AUTOTAG;,$DATA;);

This creates an attribute, such as ID_1060635, with the value of the 
unique ID attribute. YOu can then retrieve this attribute within the 
same paragraph (inside the para style definition), like this:

<Heading1 ID="$GET_ATTR($PAGE;,ID_$AUTOTAG;">

Hope this helps.

Sarah
-- 
Sarah O'Keefe	okeefe@scriptorium.com	919-481-2701
FrameMaker Adobe Certified Expert    Author, FrameMaker for Dummies
Scriptorium Publishing Services, Inc.	http://www.scriptorium.com
	

** To unsubscribe, send a message to majordomo@omsys.com **
** with "unsubscribe framers" (no quotes) in the body.   **