From the screen shots, it is difficult for me to see what is going wrong from you. If at all possible, it would be helpful to see the sample file you are using (both the ID and sample XML).
When I click on the screen shots, they do get larger, but it's not ideal.
Since I can't attach them, I'll try my public Dropbox folder.
It may be annoying that you're missing the fonts.
I made a little progress using an odd technique. I tagged the three locations of the "pipe" character | which I'm using as a divider. Those tags don't appear in the XML data, and when I import, for some reason the pipes are left alone, which is a major victory after hours of work, though I don't know why it occurs.
However that exact same technique does not work for the two text headers "Special Releases" and "Real Ale Tent" They stay in place but they lose their styling and they lose their hard return. I've tried every way to make a hard return. Ironically, I get extra hard returns I don't want after the first three paragraphs, and no manner of Story Editor helps me delete them.
This is so opaque what's actually going on during this parsing of XML!
Thanks for any tips.
Yeah, the screen shots get larger--but they don't show anything wrong. So the sample is appreciated. I got it downloaded and will take a good look at it tomorrow afternoon. Just now looking at it, I don't see why it isn't cloning the pipe symbols, etc.
I have a golf tournament early in the morning and so am headed off to sleep. I'll probably take a quick look with my morning coffee but if it isn't something really simple it will be sometime after I get back.
i have issue the same, please help me this case. Thanks
Note that the samples are from a few hours later as I realized that if I cannot put the static text in ID for cloning, I'll have to put it into the XML using search/replace. So along that strategy, I added <pipe1> | </pipe1> to the XML and tagged the pipe in the placeholder text.
After playing with this and the other pipes, I realized that I don't have to tag the pipes in ID but it does help me style the character, so I left the tags in.
I took the pipes out of the XML data, and that's when I realized that tagged text that didn't match any incoming XML data got left alone. I thought YAY, this is how I will have my pipes!
I was so excited, but it refuses to work for the two subheads. I've tagged them, I've added a spacebar after them that's also tagged, and nothing seems to work, the resulting flowed text is always the subhead text run-in with the paragraphs that follow.
The CRITICAL static text is the labels inside the beer descriptions (OG, IBU, ABV, SRM) because they are inline and a lot harder to just add manually than pipes.
OK blah blah blah. If i can't figure this by Monday morning, I'm off to huge GREP search and replace crap, which kinda defeats the whole linked XML thing.
Did you map your paragraph styles to the tags? That way they should format better. What I don't understand from your files is why the pipes and such disappear from your xml which is before that data ever gets to InDesign.
Perhaps your workflow is something like this:
Design document and create tags and pstyles
Assign tags to text and assign paragraph styles to tags.
Export the xml "template"
Modify the XML template
Import modified XML
Enjoy new text/images in your document.
I think something is wrong during the "modify the xml template" stage. Also, you can add pstyle and cstyle tags to your text as attributes in the XML. Unfortunately there is no easy way to do that and I don't believe the attributes are created upon XML export, which you would hope for in CS6 or CC.
Sorry for the delay in getting back to this.
There are a few issues in the XML for fitting your precise layout unless you add certain things manually or by search/replace. And that is what I would do to the XML in a text editor like NotePad++ (or, UltraEdit). Either could likely put in the seperators in a large text file by just a few S/R operations.
I can get part way there but it is a not quite thing. I ended up redoing parts of the XML and redoing the tagging. But the merge still fails in various places.
fwiw, QXP does this pretty quickly. There is a long-standing gotcha in that the frames are not threaded once the merge is done, but it simply works. I do most XML in Q.
I hate being beaten by an application so I will probably futz around on this--though I suspect that doesn't do you any good this iteration.
Courtesy of QXP:
I just tried a quick test with my exported XML and I lost none of the static text. Pipes, etc. all there, so the workflow in my previous post seems to be valid. I am working in CS4 right now but I can test this in CS6 tomorrow just to see if there is any difference.
Please feel free to upload a ZIP of the before and after. I suspect the OP would appreciate it and I certainly would.
Might just make it so I don't reinstall earlier versions--simply because then CS6 would have to be fully uninstalled, then the previous, then...it's a PITA.
Will do Mike, I want to test it CS6 before I get too far ahead of myself. I am pretty sure no one wants to make CS4 part of their workflow any more.
Well, it's working now and I don't know why. I cannot isolate what made the earlier versions fail and the recent ones work.
My "Almost There" files are shared here:
The database programmers are still fixing some things.
I think this is the best I can get without writing an XSLT to remove the empty data labels (specifically in the beer description, but also when address or contact info is missing).
I'm really frustrated that I don't know why it started working. When I can, I'll go back and find the files that weren't working and post them.
Thanks everyone for your help. Grateful but still a bit clueless!
I exported the XML from the file in CS6, opened that XML in Notepad to edit. Saved and imported into InDesign. Everything came through perfectly as far as the text goes, including all the static text. I lost the Header treatment despite the paragraph style. I mapped "entry" to the specialHeader pstyle and it retained the correct formatting.
I remember mapping can be a pain but if you name the tags and the pstyles the same "map by name" will save you some time.
I tried using the attributes to include the paragraph styles but I can't seem to get that part to work. aid:pstyle="specialHeader" is giving me an UnBound namespace prefix error. I added in the Adobe names space and now it says something is not well formed. Not sure where to go from here:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
I understand map by name, and that's helpful to a point, but I don't need a char style for every element because a lot of elements that are in-line are all under the same paragraph style, and map by name doesn't know that, so one ends up having to map a lot of things manually to the main paragraph style.
I did all the mapping, but I didn't think I needed to map the XML tag "specialsHeader" because I stopped using it, that is untagged static text so nothing should come in with that tag. I tried tagging it, but then I could not check the setting "Delete unused" or whatever it's called.
The InDesign import settings are pretty broad and capture a lot of different things. Removing white space should not be lumped with importing empty data fields, and I'd like to be able to tag text as the label for a field, such that if the field is empty of data, the label is not displayed.
I know, that's all for XSLT, but that's another external file to manage.
I eventually got pretty close, though I don't know what i did. Everyone says to export your own XML from InDesign and then reimport it as a test. That's fine, but really the XML is coming from a third party, so I can test all I want with my own stuff, but it's really whether it works with sample XML from the database guys.
Thanks for banging on this. It still seems murky and vague to me, those settings, and what's tagged an untagged. I mean, commas betwee address fields may be "untagged" as elements, but they are still in the XML group for the address or contact, that's necessary for cloning. So the notion of being "untagged" is kind of fuzzy. Everything is tagged if it's in a parent like Story or Root, it seems to me.
Yes, mapping by name is only a starting point, it won't get you all the way. Actually it would be so much better if the XML import treated the data as just plain text and adopted the Pstyle of the text it was replacing. SO much more convenient. Also true that nothing is untagged as you must tag the text frame as well as any sub-objects of text. The good news is THAT tag, "Entry" in your case can be mapped to the "specialsHeader" and you can remove the XML tag specialsHeader because you don't need it any more.
When I say "export your XML from InDesign" I say that meaning "give it to your developers", let them know what it is they are searching for and replacing in that file - and nothing else. I feel that is the safest route to identical static text and less errors. I think whatever your database guys are creating is wrong and I think rendering them some "clean" xml will save both of you a lot of time.
They could then also concatenate the data headers with the data and give you a mechanism by which to remove empty data fields. This is a good project and I hope everything gets ironed out for you soon.