Best markup strategy for content re-use?

This forum is for all Flare issues related to styles, stylesheets and XML.
Post Reply
Paul Griffiths
Sr. Propeller Head
Posts: 261
Joined: Wed Apr 18, 2007 2:25 am
Location: Nottingham, UK

Best markup strategy for content re-use?

Post by Paul Griffiths »

What do people think is the best way to mark up XHTML to maximise the opportunity for content re-use and re-purposing, particularly if you can’t (now) predict what those new uses and purposes might be?

To kick-start the discussion, two alternative strategies, at opposite extremes, suggest themselves:

(1) Minimal markup. Keep the XHTML tags as clean and “class-free” as possible. Prefer to style the content by using descendent CSS selectors and so on, and define explicit classes only when you really have to. One reason (perhaps) for adopting this strategy might be to keep the XHTML simple in case you later need to transform it into another form via XSLT.

(2) Maximal markup. Define classes for everything! The rationale behind this strategy is the same one that leads us to rely heavily on styles in, say, Word documents. It makes it much easier to change the presentation later in different contexts.

Personally, I tend to think that the minimal markup strategy is most likely to keep my future options open, but I’d be fascinated to know the views of other Flare users.
KevinDAmery
Propellus Maximus
Posts: 1985
Joined: Tue Jan 23, 2007 8:18 am
Location: Darn, I knew I was around here somewhere...

Re: Best markup strategy for content re-use?

Post by KevinDAmery »

I'm not sure there's as much difference between those two as you might think. What I generally do is set the base style up to cover the majority of uses, and define classes for anything that has to be treated differently.

To me, if you just change the first line of your Maximal description to "Define classes for everything that needs it!" you end up converging with "define explicit classes only when you really have to." Put another way, I can't imagine defining a class that I don't need for something specific, and the general rules about keeping documents consistent makes it highly unlikely I would design a document that needs a class I'm only going to use once.

As an example, I have a generic class called .tip that I use to call attention to text. However, I use this class for Tips, Warnings, Notes, and what have you: the only difference between those different "types" is the first word in the block (i.e. a tip starts with Tip: a warning starts with Warning: etc.) I use that class as often as the content warrants it.
Until next time....
Image
Kevin Amery
Certified MAD for Flare
Paul Griffiths
Sr. Propeller Head
Posts: 261
Joined: Wed Apr 18, 2007 2:25 am
Location: Nottingham, UK

Re: Best markup strategy for content re-use?

Post by Paul Griffiths »

Thanks for your thoughts, Kevin. Your example highlights exactly the sort of issues I had in mind. By marking up your tips, warnings and notes identically, you've compromised any future re-use of your content in which you might need to present them differently. (That's not a criticism of your choice, obviously.)
KevinDAmery
Propellus Maximus
Posts: 1985
Joined: Tue Jan 23, 2007 8:18 am
Location: Darn, I knew I was around here somewhere...

Re: Best markup strategy for content re-use?

Post by KevinDAmery »

True: but the flip side is, if I decide that the appearance of all of them has to change, I can do so once rather than having to repeat the change three times. (This has happened already in fact. Originally I was showing them with a blue background, but I decided that looked "heavy" so I changed it to indented with extra top and bottom margin and rules above and below. One CSS change updated all of them.)
Until next time....
Image
Kevin Amery
Certified MAD for Flare
forfear
Propellus Maximus
Posts: 766
Joined: Sat Feb 16, 2008 3:37 am
Location: Jungle Jingles

Re: Best markup strategy for content re-use?

Post by forfear »

If I may add to this discussion, have a look at this book by Kurt Ament.

"Single-Sourcing Documentation"

This is not a plug, but its what seems to work for me...very much so.
I know how do structured authoring. But it's the practice of truly writing for single-sourcing in the pipeline that's rather new to me. Its a process not a tool issue.

It arrived only two months ago, but the book is so well used that its starting to look 'aged' . I have it open on the desk nowadays, whenever I am writing and designing my single-sourcing projects with Flare. The content in this book is rather applicable particularly with experienced writers. You can probably find something in there that you can use or never thought about within a minute.

Its a rather neat and compact book, but very deep and well thought through. A rare find in this age of thick, full-colour page blowouts where words are cheap :)
If you submit your bug feedback request here, the more likely it'll get fixed or included in a future release
Open Utilities PageLayout Resizer for Flare/Blaze | Batch builder
Post Reply