SGMLXML.net A place for SGML and XML application developers.

March 24, 2005

Setup XML for Arbortext Epic Editing and Direct Web Browser Display using CSS

Filed under: CSS,Software,XML — cangione @ 4:38 pm

There are times when working with XML documents that it would be nice
to be able to style the document directly. To do this with CSS here is
a recipe that works with Internet Explorer, Firefox and the Arbortext
Epic Editor.

  1. Add a css stylesheet reference in your XML document.
    <?xml-stylesheet
    href="docbook.css" type="text/css"?>

  2. Modify you XML document to hide the doctype declaration in a
    comment. This stops IE from looking for it but still allows Epic to
    find it. If you are only interested in making it work with Firefox you
    can skip this step.

    <?xml version="1.0"
    encoding="utf-8"?>
    <?xml-stylesheet href="docbook.css" type="text/css"?>
    <!-- Fragment document type declaration subset:
    Arbortext, Inc., 1988-2004, v.4002
    <!DOCTYPE set PUBLIC "-//Arbortext//DTD DocBook XML V4.0//EN"
    "axdocbook.dtd">
    -->

  3. Set writenonasciichar=char in Epic and save the XML
    document. This writes all of the character entities that may be present
    out as characters so the web browsers don’t complain about not being
    able to find the reference. This needs to either be set every time you
    edit the instance in Epic or via an ACL package.
  4. Create your CSS. A small sample docbook.css:
    book {
    }
    book>title {
    display:block;
    font-size:3em;
    color:inherit;
    background:inherit;
    font-weight:bold;
    }

    legalnotice{
    font-weight:bold;
    }

    title {
    display:block;
    font-size:1.3em;
    color:inherit;
    background:inherit;
    font-weight:bold;
    }
    para {
    display:block;
    padding: 20px;
    }

CA

No Comments

No comments yet.

RSS feed for comments on this post.

Sorry, the comment form is closed at this time.

Powered by WordPress