Copy link to clipboard
Copied
I have a parent Element with an attribute (DayNum). I want to use the value of this attribute in the prefix rules of a child element. I can see that I can reference an Attribute in the PrefixRule, but it doesn't seem to recognise an Attribute from a parent element.
In normal Context Rules, I can refer to the Attribute of the parent using ParentElement[ElementName = "Value"], but that doesn't seem to work in a PrefixRule.
Is this possible?
Copy link to clipboard
Copied
It should work if the EDD syntax is correct.
Copy link to clipboard
Copied
@frameexpert What would be the syntax if it's not the immediate parent, e.g. what if the Attribute is defined on the Grandparent Element and I need to reference it on the Grandchild Element?
I tried the following:
Prefix rules
1. If context is: Grandchild < * < Grandparent
Prefix: Day: <$attribute[Grandparent:Daynum]>
But I just get the following:
Day:
Copy link to clipboard
Copied
Copy link to clipboard
Copied
I must be missing something. This is my EDD:
In the Structure View, I have the DayNum attribute as follows:
and in my document, I see this:
Copy link to clipboard
Copied
Nevermind. I saw where I made the mistake. My syntax was wrong. It should be $attribute[AttributeName:ElementName], not $attribute[ElementName:AttributeName]. Once I corrected the syntax, it is working as expected.
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more