If I had sample XSLT, because I am familiar with XML and minimally familiar with XSLT, but programming many other languages for decades, I think I could modify it for our situation. I think we could likely live with converting to almost any style, those details I could manage.
Would also love the XSLT to strip out all images...
Uh, "Facebook"? What's that? Does it have anything to do with this "twitter" thing I've been hearing about lately?
(Sorry, just joking. I'm not in to Facebook, LinkedIn, Twitter, Spotify, del.i.cious, or any of the other "social media" advertiser's honey traps.)
Can you make a small sample file that contains no sensitive material and post a public Dropbox link? Or, if the file is not very large, you can also paste it in-line in this forum. In that case please use the Advanced Editor (finally reinstated, thank you moderators!) to set its syntax highlighting to "XML".
Sorry, did not see dropbox suggestion. Here is the issue, have large XML file, could give you "head" of it, and an ePub and PDF. Is XML alone , a sample, enough? That I would be happy to post, here. How do I get to the "advanced editor". I do not see it, and how to set syntax to "XML".
All dropbox content can now be shared with a link.
Make sure you have the most current version of DB installed and right click the file and choose Dropbox>Get Link.
You can send a private message to anyone on the forums.
Um, much as I like to help you, I cannot promise anything until I've actually seen the file. It's just that without an example, *no-one* on this forum can.
I could p.m. you an email address, and you could send me your test file, and then I could decide "nah, cannot work with it". That's why I suggested you to make a small (non-sensitive) test file and make it publically available -- so that others can have a go at it as well.
... The Advanced Editor for posts is hiding under the innocuous text "Use advanced editor", at the top right of your edit window. XML syntax highlight is under the button that looks like ">>".
Okay, got your sample XML/ePub/PDF files. (It's quite big for a sample; sure looks like you sent the entire thing.)
.. What a mess! If you compare the XML to the PDF, you can see that there is some plain text in there, but it's formatted as HTML, and not everything is formatted. For example, there is nothing special in the XML file between the paragraphs that start with "So it should be no surprise.." and "After arriving at the Blind Sheik's mosque ...", but the PDF mysteriously gained a triple-bullet paragraph divider in there. Where, one wonders, did that come from?
It seems all you need from the XML file is the <title> element, immediately followed by its <content:encoded> element, which contains plain (HTML formatted) text. I had a brief go at it but the header contains lots of weird namespaces, and InDesign's XSLT processor isn't really a very modern one, so all I got was "Could not write data to output". I guess this means that there is some error -- either in my XSLT (which is really extremely basic), or in ID's handling of this XML.
Since you already have a nicely formatted PDF with all proper text in place, I'm inclined it might be faster and easier to export this PDF in Acrobat Pro to a Word .doc file. Then you can clean it up a bit in Word, and use the resulting document as your input for InDesign.
Just for clarity, this is my extremely basic XSLT-that-ought-to-have-worked:
<?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:content="http://purl.org/rss/1.0/modules/content/"> <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/> <xsl:strip-space elements="*" /> <!-- Match everything in the root --> <xsl:template match="/"> <xsl:apply-templates /> </xsl:template> <xsl:template name="channel"> <xsl:apply-templates /> </xsl:template> <xsl:template name="title"> <title><xsl:apply-templates /></title> </xsl:template> <xsl:template name="item"> <xsl:apply-templates /> </xsl:template> <xsl:template name="content:encoded"> <xsl:apply-templates /> </xsl:template> </xsl:stylesheet>
Europe, Middle East and Africa