1 Reply Latest reply on Aug 27, 2008 10:00 AM by (Suresh)

    Hiding or untag element (ID CS3 JS)

      Hi<br /><br />In Xml file  <br /><br />.... percent.<xref type="fn" rid="fn1"><sup>1</sup></xref>.....<br /><br />I want to insert footnote through script. The footnote is inserted but the numbers are occuring twice (one is the number in <xref> and other is automatic footnote insertion number by the script).<br /><br />Is there any possibility to hide <xref> through script?<br /><br />I tried the following<br /><br />function xref(){<br />this.name = "xref";<br />this.xpath = "//xref/sup";<br />this.apply = function(myElement, myRuleProcessor){<br />with(myElement){<br />     try{ <br />myElement.parent.xmlElements.item("sup").convertToAttribute("sup");<br />}<br />catch (e) {}<br />}<br />return true;<br />} <br />}<br /><br />But error is thrown.<br /><br />Uncaught javascript exception: Invalid structure iterator for the current XML rules process detected! Please modify the rules so the structural changes happen after the children nodes have processed (or skipped).<br /><br />Thanks in advance