I know you can embed data about a file, but it's for the stories within a file that I'm interested in.
An example would be adding keywords to a story(an article). I'm doing this for a newspaper. In the end, the idea is to export the whole newspaper to XML and with an XSL, I can split the paper up by each individual article and place the keywords and other data inside the head element of each article automatically.
1 person found this helpful
I suspect this workflow is doomed, like many XML workflows, because InDesign's XML support isn't all that flexible or mature.
But why don't you simply add an XML tag to each story, and then set your metadata in either attributes or child nodes of the story?
That's a helpful answer! In fact, it may be the correct answer
Seriously though, thanks.
FYI: Story objects in InDesign also have a script label. The script label is not accessible through the UI, but it is accessible via scripting (so you can use extractLabel/insertLabel to attach metadata to a story object). That might be an alternate approach to using XML tags.
Sure, but it doesn't show up when you do an XML export, does it?
I suppose if you're doing an IDML export everything shows up. Not sure
what we're talking about...
That is correct.
However, the OP did not seem to mention XML - there was just the question of metadata attached to stories in a document. Metadata and XML are two different subjects with a substantial amount of overlap - but they are not one and the same.
Script labels are an alternate method of attaching metadata to InDesign objects. I often use script labels to communicate metadata downstream in a production workflow - e.g. an InDesign template file can use script labels to instruct some script automation with regards to (semi-)automatic document constructions.
P.S. Just to be clear, I am not saying that script labels are the way to go - just wanted to express that stories have script labels (which are independent of the script labels assigned to the text frames threaded along the story).
Once the moment of export comes, some script might need to pick up the script label metadata and convert it to something that persists in the export. And as you mention - much depends on the format used for export and what needs to happen with the metadata. IDML would need no scripting (as the script labels are supported), formats like PDF or XML-based formats would need some scripting to grab the script label and convert it to something exportable. What 'something exportable' could mean I can only guess at - it could be an XML tag or some text frames in the slug area, or all kinds of other things...