Conversion to HTML

Build 1501 on 14/Nov/2017  This topic last edited on: 5/Aug/2014, at 14:41

The archiving process converts the article content to HTML instead of archiving the 'bare' justification XML.

The top-level elemens of the justification XML - i.e. the article's texts - are converted to 'div' HTML tag with a class name corresponding to the element name (with a prefix 'gn4xml_'), so

  <article>

    <head> 

       . . . 

    </head>

    <body> 

      . . . 

    </body>

  </article>

becomes:

  <div class="gn4xml_head"> 

    . . . 

  </div>

  <div class="gn4xml_body"> 

    . . . 

  <div class/> 

Paragraphs are converted to 'p' HTML tags, and pagraphs with a style are converted to 'p' tags with a class named as the justification XML element of the paragraph style (plus a prefix) - so:

   <article>

     . . .

     <body>

        <byline>. . . </byline>

        <p> . . . </p>

        . . . 

     </body>

   </article>

becomes:

  . . . 

  <div class="gn4xml_body"> 

    <p class="gn4xml_byline> . . . </p>

    <p>  . . . </p>

    . . .

  <div class/> 

Hard returns mapped to '<br/>' in the justification XML are converted to 'br' HTML tags.

Tables are converted to HTML tables, including column span / row span attributes for merged cells. If the GN4 table has a name the correspondng HTML table has a class name obtained prefixing the table name with 'gn4xml_table_'.

Bold, italic and bold+italic text is rendered with the 'b', 'i' and 'b' + 'i' HTML tags.

Text style(s) mapped as:

   <link url="...">...</link>

in the justification XML are converted to 'a' HTML tags:

   <a href="...">...</a>

Every other text style is converted to a 'span' HTML tags wth a class named as the justification XML element of the text style with a prefix.

This is defined in

  Config\Global\GN4\xsl_Archive.xslt

  Config\Data\GN4\securityScope_Default.xml

Node that to use this version of the archiving XSL it is necessary to have Build 1.3.1189 or later, due to the changes to support no target region in the justification XML generation.