Buffistechnology 3: "Press Some Buttons, See What Happens."
Got a question about technology? Ask it here. Discussion of hardware, software, TiVos, multi-region DVDs, Windows, Macs, LINUX, hand-helds, iPods, anything tech related. Better than any helpdesk!
I have a really, really basic question.
I know nothing of XML files, particularly how to create them. Our Web host (who is THE DEVIL) told us today that we need to send an XML file with all our article files every month. They even gave us the example (code? text? I don't even know what it's called) of what the file needs to say, and what variable changes every issue.
I do not know HOW to make an XML file. I pasted the text (code?) into Word 2004, and there's no save as XML option.
I'm on a Mac, 10.4.11 (Tiger), with Word 2004, Quark XPress 6.5, Acrobat 8.
I have TextEdit that comes with the Mac, and it does have a Save As Word XML option. When I do that, though, and then open it in Word, there's WAY more code (text?) than the original chunk of code (text?).
So...how do I make a frigging XML file?
This sounds like something that needs to be scripted, and not something you would want to do manually. Seriously.
Scripted...how? I mean, in a program, right? Or not? Well, everything is in a program, isn't it?
It's just 7 lines (I, uh, changed all the pointy brackets to regular brackets because I know the pointy ones break things):
[?xml version="1.0"?]
[!DOCTYPE HWExpress PUBLIC "-//HIGHWIRE//DTD HighWire Express Marker DTD v1.1.2HW//EN" "marker.dtd"]
[HWExpress type="issue"]
[site]pharmther[/site]
[volume]45[/volume]
[issue]6[/issue]
[/HWExpress]
And the "site," "volume," and "issue" lines are indented; I just didn't know how to do that here.
The only thing that ever will change is the issue number (and in Janary, the volume number).
So...how would I script that? (I don't actually know what scripting is.)
When I say "script", I mean, someone writes a small program to automate generating the file, so that you don't have to manually edit the file. But if it's just those seven lines, then it's not a big deal.
First of all, the indentation doesn't matter. Second of all, it's just a text file; you can just edit, and save it as a .TXT file. However, there are a bunch of rules you have to follow to make sure the file is syntactically correct.
However, there are a bunch of rules you have to follow to make sure the file is syntactically correct.
Well, I just copied it verbatim from what they sent us. Would what they sent us be syntactically correct?
Second of all, it's just a text file; you can just edit, and save it as a .TXT file.
They want it to be named "foo.xml," though. Which would be...not a .txt file, right?
I hate them so much.
Well, I just copied it verbatim from what they sent us. Would what they sent us be syntactically correct?
Yes.
They want it to be named "foo.xml," though. Which would be...not a .txt file, right?
You can rename the file to be foo.txt, edit it, and then rename it back to foo.xml when you're done. Alternatively, you can just open the file in TextEdit using the "Open" menu item.
Cool. I'ma try that and see if it works for them.
Thank you SO much. My brain hurts.
They want it to be named "foo.xml," though. Which would be...not a .txt file, right?
In this case, you just need to make the file extension .xml -- it's not one of those file formats that needs to be created by a particular program or anything like that.
If that seven-line doohickey is all they need, I'd just change the digit they want changed in a text editor, save as..., and send them the new one each time. It's true that xml is fussy about having all the tags be exactly right, much more so than html is (for example) -- but don't stress about scripting it. I had the same "don't do it manually" thought at first, but I was imagining them wanting the entire journal marked up as xml rather than what you're actually describing.
Your web service is still totally TINOriffic for not giving you actual help on something like this, ftr.
As I understand it, it would just be that file, only you'd change the volume and issue each time. You can change it in a text editor and then rename it. It is, however, stupid to have you do it.
What are they supposed to be doing for you? Putting your articles into html files?
Your web service is still totally TINOriffic for not giving you actual help on something like this, ftr.
This is, very seriously, about 10% of the problems they're giving us. We normally publish articles online (ahead of the print issue) as they are approved by the authors (post-editing, post-typesetting, etc.), and we publish them every week. We haven't been able to publish articles online for 3 weeks because our Web host has FUBARed our account in an epic way.
Our Big!Boss called their Big!Boss, who actually said "Yup, we dropped the ball in a big way, this is all our fault, we'll make it right for you." And *now,* after 3 weeks, they're finally fixing stuff. (I don't know entirely what was FUBARed, since I don't do anything with the ahead-of-print stuff, other than edit it. I do nothing on the technical/upload-y end for the ahead-of-print stuff. I only prepare and upload the "live' issue [meaning, the whole issue is going to press, and all the articles have actual page numbers and such in them].)
What are they supposed to be doing for you? Putting your articles into html files?
What we do is send them the issue as individual pdfs of each article. They send the pdfs to a conversion vendor who converts the pdfs to html files. (Our Web site offers both a pdf option and html option for online viewing of each article, so they do need the pdfs regardless. We aren't just sending them pdfs in order for the pdfs to be converted.)
The new process is, I think, meant to be more automated on their end. Here is their explanation, verbatim:
A HighWire Express "marker" file is a minimal XML file whose presence in a watched HighWire Express FTP directory triggers automated validation and processing of the journal content accompanying that file. The name of the marker file is always go.xml.