Hi,
I am trying to write an Indesign javascript that can set the font and style based on the import XML parent's attribute,
<products>
<product>
<language value="EN"><feature_1>1000w</feature><feature_2>10 max</feature_2></language>
<language value="JP"><feature_1>500w</feature><feature_2>2 max</feature_2></language>
<language value="TCN"><feature_1>750w</feature><feature_2>5 max</feature_2></language>
</product>
<product>
<language value="EN"><feature_1>2000w</feature></language>
<language value="TCN"><feature_1>2500w</feature><feature_2>2 max</feature_2><color>red</color></language>
</product>
</products>
each feature tag will be in its own tag frame.
all the sub-set under language value="EN" will have like Univers font, font size 100%, align to left (which mean 1000w, 10 max, and 2000w will be this)
all the sub-set under language value="TCN" will have Sim Hei font, font size 100%, align to right
all the sub-set under language value="JP" will have MS Gothic font, font size 125%, align to left
I am new to indesign scripting, can someone point me to the right direction to get this started?
Thanks,