contentsconceptssyntaxlibrariessampleserrorsindex
Full text search
XML to HTML conversions: explicit hypertext  
Related Concepts  

Introduction

Explicit links in XML are "hardcoded", and are directly translatable to HTML hypertext. However, note that using explict links in your XML can lead to many link management problems down the road. Hardcoded linking enforces navigation paths, and gives no meta information to any intelligent applications to do more interesting work.

The following OmniMark rules handle the explicit linking by translating directly to the HTML counterpart. The OmniMark program also uses referents in order to easily move around chapter title information. (Hardcoded references to a chapter have no knowledge of the title of the chapter they point to; OmniMark lets you insert that information regardless of whether the link is a forward or backward reference.)

  element xref
    output '<a href="#exp-%v(idref)">'
         || referent "exp-%v(idref)"
         || '</a>%c'

  element chapter
    increment chap-no
    output '<a name="exp-%v(id)"></a>%n%c'

  element title when parent is chapter
  local stream chap-title
    set chap-title to "Chapter %d(chap-no), %c"
    output "<h2>%g(chap-title)</h2>%n"
    using attribute id of parent
    set referent "exp-%v(id)" to chap-title



Sample Files

XML to HTML conversions: explicit hypertext
XML to HTML conversions: explicit hypertext HTML

Related Concepts  
   XML to HTML conversions
 
----  

Top [CONTENTS] [CONCEPTS] [SYNTAX] [LIBRARIES] [SAMPLES] [ERRORS] [INDEX]

Generated: April 21, 1999 at 2:01:47 pm
If you have any comments about this section of the documentation, send email to [email protected]

Copyright © OmniMark Technologies Corporation, 1988-1999.