Quantcast
Channel: Adobe Community : Popular Discussions - FrameMaker Structured
Viewing all articles
Browse latest Browse all 66580

Reading attribute values for Autonumbering?

$
0
0

FM11 / DITA 1.2

 

I'm trying to set up my EDD to automatically add translated autonumbering text to a top-level header.

 

More specifically: in my English manuals, for paragraph style Head.0, I use the autonumbering text Chapter <$chapnum>:

 

We translate our manuals into 21 languages, and I want to use the power of EDD to automatically translate the word Chapter based on the xml:lang attribute in the XML. I also want to specify different fonts for some of the languages that don't use the Roman alphabet, but that's probably a separate question (and getting this answered might help me figure that out!)

 

I have written rules in my EDD like this:

 

(These rules are under the <dita> element in the EDD)

 

Format rules for 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 so on.

 

Below that ruleset is a prefix rule to set the chapter title to the value of the "title" attribute:

 

Prefix rules

If context is: [title != “”]

Prefix: <$attribute[title]>

 

 

Now, what I think I'm telling FrameMaker is this: "Hey FrameMaker, If any element under the <dita> element has the value of the xml:lang attribute set to "foo", follow this rule."

 

But maybe I've got the syntax incorrect, or my template isn't set up correctly, or I'm just dead wrong about the context, because I can't get this to work despite multiple attempts. The autonumbering does not change at all.

 

I've tried removing the autonumbering from the head.0 paragraph style in the template on the off chance that the EDD won't override it. For a while, I suspected that maybe having this under the <dita> element is the problem, but that's where all the other chapter title stuff is specified, so I'm not sure about that.

 

What am I doing wrong?

 

Thanks in advance for any help.


Viewing all articles
Browse latest Browse all 66580

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>