Lunchtime Links: The Happy Birthday Publicious Edition

Happy Birthday, Publicious!

One year ago today, I published my first Publicious post. Here we are 150 posts later! This has been incredibly fun, rewarding, and tiring. In honor of the occasion, all of today’s links are staying “in house.” Sort of a Greatest Hits thing. Without further ado, here are the 10 most popular Publicious posts to date, according to the WordPress stats.

10. Über-Master Pages in which Cinnamon shows she is the Buffy of page layout.

9. Adventures in FontStruction in which I re-create the 8-bit Atari glory of my youth, one pixel at a time.

8. House of a Different Color in which I apply a virtual coat of paint to my in-laws’ house, thereby avoiding the actual job. Gotta love digitizing your chores. Now if I could just apply the Scoop filter to the litterbox…

7. Try to Tri-Fold Correctly in which Cinnamon drops the knowledge of just how tricky it is to make a brochure really right. Almost as cool as being able to fold a t-shirt in 2 seconds. Oops, OK, I’ll let that one external link slide.

6. TLF, My New BFF in which I wax rhapsodic about the possibilities of Adobe’s text tech.

5. Streamlining InDesign Templates in which Cinnamon shows how to build an InDesign document right, from the ground up.

4.  Basically Adaptable Styles in which Cinnamon offers up a sequel to her templating hit.

3. The Road to Hell is Paved With Double Clicks in which I reveal to the world just how far I am willing to go down the rabbit hole in search of that last morsel of geek.

2. Is This What a Kindle Killer Looks Like? in which I think I’m smarter than a company that got 615 million visitors to its website last year.

1. CS5 Revealed! in which I play a Nostradorkus, foretelling of the future of publishing tech in a book that I found at my town recycling center one Saturday. It’s Back to the Future, with mullets and vectors.

Now that’s a spicy meatball. First, a huge thanks to Cinnamon, since four of those top ten posts are hers. If only I could sabotage her sewing machine… Second, there are no posts by Eric on that list, simply because his stuff hasn’t been around long enough to accumulate mad stats yet. However, IMNSHO, Eric’s “Bits and Pieces” series should be required reading for anyone who may have to deal with XML in publishing. Which is, like, everyone, right? So here you go.

The Bits and Pieces I: Making XML

The Bits and Pieces II: Content Model

The Bits and Pieces III: Building Blocks

The Bits and Pieces IV: The Vendors

And what’s a birthday without presents? Here’s a gift for everyone: I’ve found another massively talented person to agree to be a contributor. She’s an amazing digital artist who will bring a whole new area of expertise to Publicious. Who is this person? Stay tuned!

OK, I have to go blow out these candles before the wax drips inside my keyboard.

Advertisements

A Look Under the Hood of the Hybrid

Got such a good response with the hybrid InCopy-XML workflow, I felt like it was worth revisiting to go into some details. Let’s look at the task of creating a new Schema file with XMLSpy.

In The Grand Schema of Things

The whole reason I start with a Schema and not a DTD is that XMLSpy lets you graphically create Schema. It is a heck of a lot easier for a non-programer to do than writing the code from scratch. But I won’t lie to you. You still need to learn something about XML in general and Schema (with a captial “S”) in particular. It’s not quite as easy as just drawing a diagram of your content model.

Well, you can draw pretty much whatever you want, but if you don’t know the pitfalls, you’ll get validation errors. And without a valid Schema, you can’t create a that user-friendly authoring template that you need to sell your editors on this whole XML workflow thing.

Help!

Learning XMLSpy can be frustrating for someone who’s used to working with programs like Word and the Creative Suite. The rules for making valid code are strict, the error messages and other jargon might as well be written in another language. Which, actually it is. And the Help won’t teach you anything about XML you didn’t already know. It barely teaches you about XMLSpy. It assumes you know all the rules for coding, and just tells you which buttons perform which functions.

You could buy a printed copy of the manual on E-Bay for $108 (Altova doesn’t sell ’em). But instead I would recommend you do the tutorial and then keep something like the O’Reilly book XML in a Nutshell within reach at all times, to serve as a de facto manual. That way you can use that $70 for beer and stand just about the same odds of making a useable Schema.

Namespaces

You need to learn about namespaces right off the bat and make them part of your Schema design so you can use InDesign’s feature of mapping XML attributes to paragraph and character styles. This is necessary since not every paragraph is going to look the same in your layout, but they are still all just paragraphs. I’m not going to get deep into namespaces here since I could devote a few posts to nothing but namespace issues I’ve had.

OK, now that I made it sound hard, let’s make it look easy.

Diagramming a Content Model

We’ll create a basic Schema for a Major League Baseball team, in honor of the World Series Champeen Red Sox. In XMLSpy, choose File > New and pick W3C XSD from the list of file formats.

Enter the name of your root element in our case, baseball_team, and an optional description of it.

plish010-bluetree.jpg

At any time you can choose Text view to see or edit the code. That’s when you’re really glad you don’t need to ever see or edit the code. It’s like opening up the washing machine while it’s running. You just take a peek, maybe throw a pair of socks in there, and close the lid.

plish010-code.jpg

Then click the little blue tree icon to show the Schema diagram. This is where the fun begins.

You now have a wide open field in which to draw out all the children of the root element.

Everything is connected automatically, so you won’t have any loose floating pieces. Now you apply all that stuff you learned in your planning meetings, the elements, the attributes, restrictions and relationships they have. You drag out a connector from the baseball_team element, and choose what kind of child it has.

plish010-addchild.jpg

In this case, it’s a sequence (indicated by the line of dots) of two elements, players and coaching_staff.

plish010-playercoach.jpg

players is a sequence of position_players and pitchers. position_players is a sequence of infielders, outfielders, and bench, all with an attribute describing the postion they play. You keep going in this manner till you’ve finished diagramming your content model.

plish010-wholeschema.jpg

Regarding attributes, if you want to give your editors a pop-up list of values to choose from, enter the legal attribute names in the facets > enumerations tab.

plish010-enumeration.jpg

You can also assign minimum and maximum occurrence values to restrict how many of a certain element you’ll allow. In our example, you have to have at least 3 outfielders on your roster to field a team (and pass a validation test). If no number is shown under an element the schema calls for exactly one of that element. Or you can make an element optional by setting the minimum occurrence to zero, like I did with the assistant_manager and the box outline becomes dashed.

Once you are done, you can convert the Schema to a DTD for importing into InDesign, or showing your friends in the bleacher seats.

plish010-dtd.jpg

On second thought, don’t show your DTD in the bleacher seats. That conversation probably won’t end well.

Of course the devil’s in the details, and there are plenty more details, but let’s leave it there for now. That wasn’t too painful, was it? We made the engine of the hybrid InCopy-XML workflow, a real live W3C XML Schema, without hand coding it.