Copy link to clipboard
Copied
Hi,
I'm setting up my first EDD. I'm trying to create a list element that allows the user to select attributes for bulleted or numbered formatting. I thought I had copied the Delveoper Guide pretty closely, but it's not working.
Can someon explain what I'm doing wrong?
Here's what I have in the EDD:
Element (Container): List
General rule: List-item+
Attribute list
Name: List-type Choice Required
Choices: Bulleted, Numbered
Automatic insertions
Automatically insert child: List-item
Text format rules
In all contexts.
Basic properties
Indents
First indent: 0.1in
Left indent: 0.25in
Paragraph spacing
Space above: 4pt
Tab Stops
Tab stop position: 0.25in
If context is: List-item [List-type = ”Bulleted”]
Numbering properties
Autonumber format: \b\t
Else, if context is: List-item [List-type = ”Numbered”]
Numbering properties
Autonumber format: <n>.\t
This is what it looks like whether I select the Bulleted or Numbered attribute:
Paragraph paragraph paragraph
list
list
list
Hanna,
Your element definition is almost right. The problem is that you are specifying all formatting on the List element, which is OK in a simple structure, but you are testing whether that List is in a ListItem.
The simplest fix would be to change the context specification from:
List-item [List-type = ”Bulleted”]
to simply
[List-type = "Bulleted"].
Another approach would be to move the context rule into the definition of List-item and change the context rule to
List[List-type
...Copy link to clipboard
Copied
Hanna,
Your element definition is almost right. The problem is that you are specifying all formatting on the List element, which is OK in a simple structure, but you are testing whether that List is in a ListItem.
The simplest fix would be to change the context specification from:
List-item [List-type = ”Bulleted”]
to simply
[List-type = "Bulleted"].
Another approach would be to move the context rule into the definition of List-item and change the context rule to
List[List-type = ”Bulleted”]
Something else you'll need to account for is resetting the counter if there is more than one list in the document and you don't already reset it.
--Lynne
Copy link to clipboard
Copied
Thank you!
Copy link to clipboard
Copied
This is what I've used--this is from my Para tag which has a lot of context uses.
(Sorry--was too lazy to indent...)
Else, if context is: Item
If context is: Item < List[Type="Bullet"]
Count ancestors named: List
If level is: 1
Use paragraph format: Body_BulletList1
Else, if level is: 2
Use paragraph format: Body_BulletList2
Else, if level is: 3
Use paragraph format: Body_BulletList3
Else, if context is: Item < List[Type="Numbered"]
Count ancestors named: List
If level is: 1
If context is: Item{first} < List
Use paragraph format: Body_NumberList_L1reset
Else
Use paragraph format: Body_NumberList_L1
Else, if level is: 2
Use paragraph format: Body_NumberList_L2
Else, if level is: 3
Use paragraph format: Body_NumberList_L3
Else, if context is: Item < List[Type="QandA"]
Count ancestors named: List
If level is: 1
Use paragraph format: Q_Question
Else
Use paragraph format: Q_Answers
Link to file:
Copy link to clipboard
Copied
That's very helpful, thanks!
Copy link to clipboard
Copied
I should note that I am using paragraph tags rather than listing all the type specs.