XML really has no concept of pages. One can export to XML, reimport the XML and move sections into a heirarchy that can be acted upon by an XSLT. And I can write an XSLT that breaks an XML into individual XML files, but there is no real control over the naming sequence. So the XML files, which would be numbered, have gaps in the numbering though they are in logical "page" order.
This may get you a little closer to your goal. It is based upon Sections. So you would need to place section markers. You would then create an ePub. An ePub file is really a compressed ZIP archive. Which once created, you can change the ePub extension to zip. then you can extract the contents. Inside the extracted folder will be a folder that contains one html file per section, as well as a style sheet, images, etc.
That's about the best I can suggest.
Thank you !
You are most welcome.
I wish I could figure out a better way.
Take care, Mike
@Mike – I am not really into this XML business, but maybe scripting has a solution for the view on pages using XML. At least there is a placeXML() method for pages (or individual objects).
For details look here:
Ok. But this is only for placing.
Exporting XML seems only possible for the whole document.
But this is really out of my realm…
Thank you very much Uwe, these two pages look really helpful.
1. "... all the other tags I need for the titles, subtitles" -- if you consistently used paragraph styles for these, you can use the "Map Styles to Tags" command in the XML panel dropdown menu. That is, create tags for all styles you need to transfer, then use this command to have InDesign automatically apply them to the correct styles.
If you did not use paragraph styles (or were not consistent), you will need to manually add a tag to each title. Still doable but way more work.
If you don't like the idea of messing up your document, you can inquire in the Scripting forum for a script that adds a tag around the text in the text frames you have right now. Not sure how (or if) that would work; but it sounds do-able.
Two great tips : the SplitStory script allows me to have a page structure absolutery similar to my pdf publication (even if I heard what you and Mike said : XML is not made for it and can provide very useful semantic structures). And the "Map Styles to tags" command may allow me to save a lot of time when it comes to html integration...
Thanks a lot !