HTML export

Having trouble installing Oxygen? Got a bug to report? Post it all here.
ttasovac

HTML export

Post by ttasovac »

I am a newbie having difficulties with HTML conversion. I am using a valid, well formed TEI lite doc (from the template that comes with oxygen) which starts like this:

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/css" href="file:/Volumes/Users/ttasovac/Applications/oxygen%203.0%20MacOSX%20Folder/tei/dtd/teixlite.css"?>
<!DOCTYPE TEI.2 SYSTEM "file:/Volumes/Users/ttasovac/Applications/oxygen%203.0%20MacOSX%20Folder/tei/dtd/teixlite.dtd"[
<!ENTITY % TEI.XML "INCLUDE">
]>
when i try html output, i do get an html file, but all it contains is:

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
Does anybody know why this would be happening? Also, even thought the xml style sheet was set by the template, I don't actually see a file called teixlite.css in that directory?

Thanks a lot in advance.

T.
ttasovac
Posts: 82
Joined: Fri Dec 19, 2003 6:02 pm

just registered, so that i can get the replies

Post by ttasovac »

:shock:
sorin_ristache
Posts: 4141
Joined: Fri Mar 28, 2003 2:12 pm

Post by sorin_ristache »

Hello,

To convert to HTML you need to use the teihtml-teic.xsl as instructed in the README file located in the tei subfolder of the <oXygen/> installation folder. Fot this just set the teihtml-teic.xsl stylesheet in the XSL URL field of the Configure Transformation dialog. You can find this stylesheet in the xsl/html subfolder of the mentioned tei folder.

The teixlite.css stylesheet set by the template is a CSS stylesheet contains visual formatting instructions for a browser to display the XML document. But for a HTML version of your TEI document I recommend you to convert it to HTML (the Apply Transformation toolbar button) with the mentioned XSL stylesheet.

Somehow teixlite.css is missing from the 2.0.4 release but you can create it in the tei/dtd subfolder of the installation folder by copying and pasting its contents from here:

Code: Select all


/* Use Times New Roman for default font */
$DOCUMENT {
font-family: "Times New Roman";
font-size: 12pt;
margin-top: 5px;
margin-left: 5px;
}

$COMMENT {
display: block;
color: purple;
white-space: pre;
}

$PROCINS {
color: black;
background-color: #c0c0c0;
}

emph {
font-weight: bold;
}

head {
display: block;
text-align: center;
font-size: large;
}

label {
display: block;
font-style: italic;
}

speaker {
font-weight: bold;
font-style: italic;
}

lb, address, addrLine, argument, author, authority, availability, back, bibl, biblFull, biblScope, body, byline, catDesc, category, cell, change, cit, classCode, classDecl, closer, distributor, div, div0, div1, div2, div3, div4, div5, div6, div7, edition, editionStmt, editor, editorialDecl, encodingDesc, epigraph, extent, figure, fileDesc, front, funder, group, imprint, interpGrp, item, keywords, l, label, language, langUsage, lg, list, listBibl, name, note, notesStmt, opener, p, principal, profileDesc, projectDesc, publicationStmt, publisher, pubPlace, q, ref, refsDecl, rendition, resp, respStmt, revisionDesc, row, salute, samplingDecl, seg, seriesStmt, signed, sourceDesc, sp, speaker, sponsor, stage, table, tagsDecl, tagUsage, taxonomy, TEI\.2, teiHeader, term, text, textClass, title, titlePage, titlePart, titleStmt, trailer, creation, eg, div6, div7, editor, epigraph, group, l {
display: block;
}

title, hi, stage, term {
font-style: italic;
}

titlePage {
display: block;
font-size: x-large;
}

item {
display: list-item;
list-style-type: disc;
white-space: normal;
}

p {
text-indent: 10pt;
padding-bottom: 3mm;
}

term {
display: inline;
}

title {
display: inline;
}
Regards,
Sorin
ttasovac
Posts: 82
Joined: Fri Dec 19, 2003 6:02 pm

Post by ttasovac »

Thanks a lot for the css file info, Sorin.

The reason I was getting empty files, however, has to do with what seems like a bug in Oxygen (on Mac OS X). In the configure scenario panel, I chose the option prompt for output file. After the transformation is complete, I am asked to provide an output file name, which I do -- the file is then created, but it's empty. I only today realized that oxygen automatically produces another file, index.html, in the same directory, which actually displays HTML properly -- unlike the file which I designated for that purpose.

(I am working with 3.0 beta)

Anyway, many thanks for you help. I am a beginner with XML, but I really enjoy working with oxygen.

All best,
Toma
sorin_ristache
Posts: 4141
Joined: Fri Mar 28, 2003 2:12 pm

Post by sorin_ristache »

The empty file is created if you feed teihtml.xsl to the XSLT engine. This is how the stylesheet works and is not a bug in <oXygen/>. Use teihtml-teic.xsl and the HTML output should be placed in the right file regardless of selecting "prompt for file" or "save as".

Regards,
Sorin
ttasovac
Posts: 82
Joined: Fri Dec 19, 2003 6:02 pm

Post by ttasovac »

Gochya. Thanks!
Post Reply