I require to delete the attribute and value in xml structure.
Below code is not working due to ":" (aid:cstyle) between attribute name.
JS code is:
evaluateXPathExpression("//typestyle[@aid:cstyle = 'bold']")
If I remove colon and change it to aidcstyle than it is working. How to read : (colon)?
Also it is showing alert message again and again.
for the first problem there are two fixes:
first one (simple, normal, no ideea why it's not there already) declare your aid (and aid5) namespaces in your xml. For example:
<Root xmlns:aid=”http://ns.adobe.com/AdobeInDesign/4.0/” xmlns:aid5=”http://ns.adobe.com/AdobeInDesign/5.0/”>
second one: more advanced xpath, if it works, using local_name() and namespace-uri(). My xpath-expert is not at work right now, so i can't help you more with this until he's back.
second problem... no real fix for now. some characters that indesign uses (indentToHere and rightIndentTab, as far as I know, but may be others too) have no UTF equivalent, so you get that warning. you can eitehr ignore it, or, as I do, before doing anything with XML in scripting, i change the said characters to some marking (##RIT## and ##ITH##), and change them back after changing the XML
Thank you so much for your response on this, Vamit.