Reading attribute values for Autonumbering?


fm11 / dita 1.2

 

i'm trying set edd automatically add translated autonumbering text top-level header.

 

more specifically: in english manuals, paragraph style head.0, use autonumbering text chapter <$chapnum>:

 

we translate our manuals 21 languages, , want use power of edd automatically translate word chapter based on xml:lang attribute in xml. want specify different fonts of languages don't use roman alphabet, that's separate question (and getting answered might me figure out!)

 

i have written rules in edd this:

 

(these rules under <dita> element in edd)

 

format rules first paragraph in element

if context is: [title != “”]

use paragraph format: head.0

 

if context is: * < dita [xml:lang = “en”]

numbering properties

autonumber format: chapter <$chapnum>:

character format: ~headergray

 

else, if context is: * < dita [xml:lang = “bg”]

numbering properties

autonumber format: Глава <$chapnum>:

character format: ~headergray

 

...and on.

 

below ruleset prefix rule set chapter title value of "title" attribute:

 

prefix rules

if context is: [title != “”]

prefix: <$attribute[title]>

 

 

now, think i'm telling framemaker this: "hey framemaker, if element under <dita> element has value of xml:lang attribute set "foo", follow rule."

 

but maybe i've got syntax incorrect, or template isn't set correctly, or i'm dead wrong context, because can't work despite multiple attempts. autonumbering not change @ all.

 

i've tried removing autonumbering head.0 paragraph style in template on off chance edd won't override it. while, suspected maybe having under <dita> element problem, that's other chapter title stuff specified, i'm not sure that.

 

what doing wrong?

 

thanks in advance help.

hi,

 

your context specifications don't quite want:

 

     * < dita [xml:lang = “en”]

 

doesn't test whether current element has ancestor, still within dita element, specified attribute value, whether current element has dita ancestor attribute.

 

try

 

     *[xml:lang = "en"] < * < dita

 

or just

 

     *[xml:lang = "en"]

 

instead.

 

   --lnne



More discussions in FrameMaker Structured


adobe

Comments

Popular posts from this blog

Could not place because the source rectangle is empty

Thread: Using smartcard reader with vpnc

Adobe Font Folio 7.0 or just 7?