Copy link to clipboard
Copied
I'm completely new to xml.
I'm attempting to import a xml into InDesign. I've basically got things working, but I'm surprised to find that the process of mapping tags to styles is glacial on my machine—mapping a tag to a style seems to take from 15 minutes to an hour.
I've tried clearing the InDesign cache with no apparent effect.
I'm using a Mac Studio M2 Max, 32 GB memory. Mac OS 14.7.1
InD version 2-.3.
I'm getting similar results from the latest InD beta.
The xml file is from Oxford's resources based on the Bodleian copy of the First Folio of Shakespeare's plays. It's described as being "encoded in Text Encoding Initiative XML (TEI P5 conformant)," if that means anything to anyone. It's 398 KB.
Any thoughts?
Well, if you don't have any background in manipulating XML, then my telling you to do what that link suggests would be tantamount to throwing you in the deep end of the pool. (It may be what's called for, though - let's see.)
I can cause InDesign to hang for 15 minutes via two different methods, using your template and the provided XML document:
1) The raw text in the XML makes extensive use of a properly encoded non-breaking hyphen. I don't have either of your fonts installed, so I replace
...It does seem that the font may lack a non-breaking hyphen (I'm surprised, it's fairly recent Adobe Original) but I'm not seeing any errors reported. Sorry to say, I can't figure out how the character is encoded in the xml—can you fill me in on that? It doesn't seen to be unicode or html encoding.
Well, the XML file says that it's in UTF-8 encoding, right? I have my install of Notepad++ set up to use a font that clearly doesn't support the non-breaking hyphen:
Support for the non-breaking
...Copy link to clipboard
Copied
I'm attempting to import a xml into InDesign. I've basically got things working, but I'm surprised to find that the process of mapping tags to styles is glacial on my machine—mapping a tag to a style seems to take from 15 minutes to an hour.
Do you mean the process of opening a dropdown menu and picking a style to go with a tag takes 15 minutes to an hour? Or that the manual process of mapping all those tags to styles takes you an hour? I was able to find a little bit of lag when manually mapping tags to styles, with particularly large and complicated XML files, but nothing like what you describe.
That makes me wonder about your input file, of course!
The xml file is from Oxford's resources based on the Bodleian copy of the First Folio of Shakespeare's plays. It's described as being "encoded in Text Encoding Initiative XML (TEI P5 conformant)," if that means anything to anyone. It's 398 KB.
You're working with one of these, right?
That particular flavor of XML is something I've seen mentioned, but not something I've worked with before. I wonder how much of that tagging... stuff is necessary for your project? Because while I've never touched TEI P5 conformant XML, I've handled many XML formats that required extensive preprocessing before they could be easily transformed into print documents in InDesign. If you know are familiar at all with applying XSL transforms to XML, then you might consider turning that heavily-tagged academic XML into something more lightweight. That might address your concerns, whether they are "each tag takes an hour to map" or "each XML file has so many tags that it takes an hour to map them all".
If you tell us which play you're trying to import, and maybe if you post an empty template with your styles, with a brief description of your goal (how much of that XML structure are you trying to capture in your format?) we could try to reproduce your issue ourselves to see if this was maybe something wrong with your install of InDesign, and not your input file. For what it's worth, I was able to make a few quick paragraph styles and import the text for The Tempest without any hour-long delays. (I didn't manually map all the styles to tags, though, making me wonder if what you're looking for is an easy way to automate the production of all the styles you'd need to automap tags to styles.)
Copy link to clipboard
Copied
No, not the manual process: the app beach ball spins for 15 minutes to an hour before the app becomes responsive.
Yes, one of those— <"the winters tale" link removed to prevent spam labeling - kglad>
I'm attempting to produce an editable "acting script" for a group of young actors while retaining the original punctuation and spelling; no other structure per se. It will be used for a Shakespeare Summer Camp. In previous years they've used photocopies of a facsimile edition, very unwieldy
I have no experience with XML or XSL. Thanks for the link.
I can't seem to attach a template, so I've put on one my web site here.
Copy link to clipboard
Copied
Well, if you don't have any background in manipulating XML, then my telling you to do what that link suggests would be tantamount to throwing you in the deep end of the pool. (It may be what's called for, though - let's see.)
I can cause InDesign to hang for 15 minutes via two different methods, using your template and the provided XML document:
1) The raw text in the XML makes extensive use of a properly encoded non-breaking hyphen. I don't have either of your fonts installed, so I replaced them with temporary placeholder fonts. If I choose a font that doesn't have a non-breaking hyphen, I get hundreds of "Missing Glyph Protection" warnings. If I
2) If I try to Map by Name, it locks up. I expect that this is because it has to try to map all of those hundreds of tags to style names that just aren't there.
In your shoes, here's what I'd try.
1) First thing would be to use a font that actually had all the glyphs necessary. (Or, if I didn't have a font that had the non-breaking hyphen, I might crack open the XML in my text editor of choice, do a Find/Change to replace all nonbreaking hyphens with ordinary hyphens, and then save the XML with a new name and try to use that file.
2) If that file was still freezing, I might try a different input file. That degree of formatting in the archival XML is overkill for your project, I think, given the number of styles you have in your template. It might be easier to grab it from Project Gutenberg in plaintext and style it yourself, I think.
If you have a compelling reason to use this file, I encourage you to post your step-by-step workflow that causes InDesign to freeze, and we can figure out if it's something wrong with your XML input file, or maaaaaybe something wrong with InDesign. If you coulnd't use any other source file, it's possible to write XSL to do things like this
before
<sp who="#F-wt-her">
<speaker rend="italic">Her.</speaker>
<l n="141">Grace to boot:</l>
<l n="142">Of this make no conclusion, least you say</l>
<l n="143">Your Queene and I are Deuils: yet goe on,</l>
<l n="144">Th’offences we haue made you doe, wee’le answere,</l>
<l n="145">If you first sinn’d with vs: and that with vs</l>
<l n="146">You did continue fault; and that you slipt not</l>
<l n="147">With any, but with vs.</l>
after
<speaker>Her.</speaker>
<body>Grace to boot:<body>
<body>Of this make no conclusion, least you say</body>
<body>Your Queene and I are Deuils: yet goe on,</body>
<body>Th’offences we haue made you doe, wee’le answere,</body>
<body>If you first sinn’d with vs: and that with vs</body>
<body>You did continue fault; and that you slipt not</body>
<body>With any, but with vs.</body>
I think that by reducing the sheer number of tags, and reducing the amount of stuff inside the tags that InDesign can't use (like rendering intent?) it might be possible to produce a usable XML file that doesn't lock up your machine for an hour. It's a very useful skill, being able to process XML with XSL, but the learning curve is steep.
Faster to just get it from Project Gutenberg, no? Is there a reason that you're using this much more complex format?
Copy link to clipboard
Copied
Thanks for your thoughtful response. I really appreciate you taking the time.
It does seem that the font may lack a non-breaking hyphen (I'm surprised, it's fairly recent Adobe Original) but I'm not seeing any errors reported. Sorry to say, I can't figure out how the character is encoded in the xml—can you fill me in on that? It doesn't seen to be unicode or html encoding. (The string "2011" doesn't seem to appear except for a line number.)
The instructors at the camp want the students to works with "original" spelling and formatting conventions, and this version retains all that.(Is it worth it? Not my call.) Most other online versions are "cleaned up."
As it happens, in the end the very slow process did allow me to recover most of the formatting I wanted, with the exception of the italics, which I applied with search and replace and manually. So, the immediate task is accomplished.
As to my step by step: after looking a bit at the tags in the XML, and guessing at their meaning, I created a blank InD doc, and built the styles I wanted. Then I imported the XML, and assigned styles to the tags I had identified as likely to be germane. And then I waited. When the app returned, I flowed the test into the doc.
It does seem as if the this whole XSL thing would be good to know for the future, though. I will stare again at those links.
Copy link to clipboard
Copied
It does seem that the font may lack a non-breaking hyphen (I'm surprised, it's fairly recent Adobe Original) but I'm not seeing any errors reported. Sorry to say, I can't figure out how the character is encoded in the xml—can you fill me in on that? It doesn't seen to be unicode or html encoding.
Well, the XML file says that it's in UTF-8 encoding, right? I have my install of Notepad++ set up to use a font that clearly doesn't support the non-breaking hyphen:
Support for the non-breaking hyphen is not really common. But after some further testing I'm finding that, when I have Kis VF activated, this missing glyph isn't actually dropping. I believe that InDesign is substituting the normal hyphen-minus glyph and then treating it as if it has No Break applied. So, a missing glyph is not likely as the cause for your hour-long wait.
And then I waited. When the app returned, I flowed the test into the doc.
Glad to hear that it worked in the end. I have some speculations as to why it is that this particular weirdo flavor of XML causes InDesign to choke, but if you managed to flow your text in successfully it doesn't seem like it's worth pursuing unless some Shakespeare scholar shows up here with similar issues.
Copy link to clipboard
Copied
Again, thanks for taking the time to consider all this.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now