I am exporting InDesign pages to xml via xhtml cross-platform export. The only issue I have is that the auto-page numbers do not show up in the xml output. I have been trying to set the content of every text frame whose applied paragraph style is "page" (a style I set on the master pages). Here is my appleScript which does not seem to work:
set theStyle to paragraph style "page"
set DocPages to the document offset of every page
repeat with i in DocPages
tell page i
set pageNum to document offset as string
set myTextFrames to (every text frame whose applied paragraph style is theStyle)
repeat with t in myTextFrames
set contents to pageNum
tell text 1 of parent story to recompose
set applied paragraph style of parent story to "page"