Hi,
I would not do the export of the frame within an XML rule.
Without the export InDesign will create more than two frames.
function sample(){
this.name = "sample";
this.xpath = '//*[@font="Medicine Symbols 1"]';
this.apply = function (myElement, myRuleProcessor){
with(myElement){
var myframe = myDoc.pages[0].textFrames.add();
myElement.placeXML(myframe);
myframe.fit(FitOptions.FRAME_TO_CONTENT);
//myframe.select();
//var imageName = myElement.xmlAttributes.item('id').value''
//$.writeln (filepath = myFolder+"/"+imageName+".jpg");
//myframe.exportFile(ExportFormat.JPG, new File(filepath), false);
}
}
}
thanks Stefan