One of the coolest things that Omnimark had at the time (I used it about 10 years ago) was the concept of referents.

Imagine you are taking an SGML file and down-translating it into plain text. You encounter a link reference that you have to emit as "see chapter 10". You are, however, on chapter 2, and you have no idea in which chapter the link target will fall.

So you open a referent and send it to the output stream at this point and move on. By the time you get to the link target, you can finally resolve the chapter number. As it happens, it turned out to be chapter 11 anyway. So you write "see chapter 11" to the referent, and close it. Here, Omnimark waves its magic wand and presto! the text gets inserted automatically back in chapter 2. It does all this by managing a number of intermediate temporary files behind the scenes. But it works correctly and transparently and is a joy to use.

In the following years, whilst wandering through CPAN one day, I found a module that purported to offer exactly the same functionality. Unfortunately I can't find it after a long search, maybe the above description is enough to prod someone else into remembering the name.

<update>Naturally, two minutes after posting this and proofing typos, I went straight back into CPAN and zeroed in on the module in question: Data::Locations. It also looks like String::Divert might be of use too. Funny the way the brain works.</update>

The downside of Omnimark is that it is (IMHO) an exceedingly verbose language. Everything has to be spelt out in excruciating detail, almost as bad as COBOL's ADD A TO B GIVING C.

That said, if you are hardcore SGML, doing hairy SGML conversions from one schema to another, and/or have complex validations to perform on native SGML data files, the fact that it is fully SGML-aware makes lots of things really easy since so much is built in.

If you wanted to do the same in Perl, even with all the modules on CPAN your code would still have a lot of fussy "make work" code. But if your parsing and processing needs are simple you could certainly use Perl.

Omnimark was a small-domain language, at least 10 years ago. I imagine it has evolved considerably in the meantime, but back then, while it was exceptionally good at munging SGML, it wasn't useable for anything else, it's not a general purpose language. Perl is.

At the time there was a trial copy available. It was limited in a number of ways, but quite useable nonetheless. The full version required a dongle, and was fiercely expensive. This may have changed too since then.

I think you want to look at OmniMark Developers Resources to find out more about it.


In reply to Re: Omnimark vs. Perl by grinder
in thread Omnimark vs. Perl by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.