1 person found this helpful
Before heading down this path...
Have you tried setting up your pages with multiple columns and then using
page.placeXML( using, placepoint, autoflow )
In a previous life, I used that method to auto-flow large, facing page, multi-column catalogs.
I've also used that method to place 100+ page documents of xhtml, that was then correctly styled using XmlRules after the place.
I could certainly consider it. I have not used placeXML before, and I don't know if it behaves differently from import XML. At the moment I am importing xml into a template tagged with corresponding elements, which means the catalogue is autogenerated. Would placeXML work in the same manner, by replacing and cloning repeating elements as necessary, while ignoring whitespace to preseve the layout? If so, I'll look into that approach, certainly.
Surely if I am styling after the fact with XMLRules that means that I'll need a new script/new XMLRules each time I have a new layout? The benefit of using import XML here is that as long as the element tags are still in the same order, I can change/create a completely new layout that will still work with the script.
Depends on exactly what you're doing.
Your post talked about flowing xml through a 2 column document, yes, it will do that.
If you are specifically using anchored frames and such inside those auto-flowed frame, you'll need to run an XMLRule to properly handle the frame.
If your XML contains tables, it will render tables if the XML is correctly designed. For example, it will render an html table if you remove the <tr> and <th> tags from the html and add hints, and there are other table formats it will correctly render.
I have begun my first script to auto format a catalog from a well structured XML file. I found your placeXML option extremely useful. My catalog is only about 50 pages and the specific chapter I've been testing my script on is only 4 pages. It's a catalog of products with info like: name, product#, description, etc. here's what I've setup so far
1) create doc
2) define paragraph styles
3) map styles to XML tags
4) import XML
5) place XML (using the example you note above)
Have you had issues with placing XML with mapped styles? My INDD crashes every time on the place. If I define styles and only give each style a name without setting any other property it won't crash. Any thoughts on why applying paragraph styles when placing XML would cause a "can't reference memory at ..." Error?
Any insight is greatly appreciated. Thanks!