[MarkLogic Dev General] loading XML documents with DTDs

Alan Darnell alan.darnell at utoronto.ca
Tue Jun 19 08:24:55 PDT 2007

I have a number of documents (sample below) in XML format but not  
UTF-8 encoding and with an externally referenced DTD and rendering  
stylesheet.  What's the best way to get these documents into  
MarkLogic so that:

- the encoding is changed to UTF-8
- any entities in the DTD are resolved to UTF-8 encoded characters
- any CDATA sections are removed with the content left intact,  
including markup embedded in the CDATA content

Do I need to pre-process the files before loading or can Mark logic  
handle these kinds of conversion as part of the load functions?

Also, does anyone know of any good strategies for converting math in  
TeX format to MathML?



Alan Darnell
University of Toronto

<?xml version="1.0" encoding="iso-8859-1"?><?xml-stylesheet  
type="text/xsl" href="file://batchgate1\StyleS\bpg4
<content dtdver="4.0" docfmt="xml">
                 <publisher>Blackwell Publishing Ltd</publisher>
                 <address format="inline">Oxford, UK</address>
         <contentinfo type="journal" language="en">
                         <title type="journal">Journal of Thrombosis  
and Haemostasis</title>
                 <copyright>2006 International Society on Thrombosis  
and Haemostasis</copyright>
         <document type="primary_article" sequence="1"  
                         <documentinfo language="en">
                                         <documentid type="doi"  
id="10.1111/j.1538-7836.2006.02000.x" status="live" />
                                         <documentid type="bpl"  
id="2000" status="live" />
                                         <documentid type="version"  
id="fi" status="live" />
relationship="child" type="object" />
                                         <related relationship="self"  
name="jth_2000.xml" type="xml" />
relationship="sibling" type="pages">
name="jth_2000.pdf" type="pdf" />
                                 <date date="2006-08">August 2006</date>
                                         <issue sequence="15">8</issue>
                                         <page type="first">1747</page>
                                         <page type="last">1755</page>
                                         <count type="figure_total"  
count="6" />
                                         <count type="table_total"  
count="3" />
                                         <count type="page_total"  
count="9" />
                                         <trackingdate type="created"  
date="2006-04-25" />
type="markedup" date="0000" by="SPS" software="preediting tool"  
version="4.0" />
type="paginated" date="0000" by="FSS_SPS" />
type="received" date="0000" />
                                         <trackingdate type="revised"  
type="accepted" date="0000" />
type="Delivered as FI" date="20060825" />
                                 <tocheading level="1">ORIGINAL  
type="title"><i>Tissue factor antigen in plasma</i>
type="author"><i>B. Parhami-Seren</i> et&nbsp;al
                                 <p>Received 23 February 2006,  
accepted 12 April 2006</p>
                                 <correspondent id="c1">Behnaz  
Parhami-Seren, Department of Biochemistry, College of Medicine,  
University of Vermont, 208 South Park Drive, Cholchester, VT  
05446-0068, USA.<br />Tel.:+1&nbsp;802&nbsp;656&nbsp;3286; fax:  
+1&nbsp;802&nbsp;656&nbsp;2256; e-mail:
type="email">behnaz.parhami-seren at uvm.edu</externallink>
                                 <title type="surtitle">ORIGINAL  
                                 <title type="document">Immunologic  
quantitationof tissue factors</title>
                         <namegroup type="author">
                                 <name type="author">
                                 </name><x>, </x>
                                 <name type="author">
                                 </name><x>, </x>
                                 <name type="author">
                                 </name><x> and </x>
                                 <name type="author">
                                         <forenames>K. G.</ 
forenames><x> </x>
                                 <address format="inline">Department  
of Biochemistry, College of Medicine, University of Vermont,  
Burlington, VT, USA</address>
                         <summary language="en">
                                 <heading implicit="yes" id="h1"  
level="5" format="inline">Summary.&ensp;</heading>
                                 <p>The large number of conflicting  
reports on th
e presence and concentration of circulating tissue factor (TF) in  
blood generate
s uncertainties regarding its relevance to hemostasis and association  
with speci
fic diseases. We believe that the source of these controversies lies  
in part in
the assays used for TF quantitation. We have developed a highly  
sensitive and sp
                         <keywordgroup language="en" format="display">
                                 <heading implicit="yes" id="h2"  
level="5" format="inline">Keywords:&ensp;</heading>
                                 <keyword>fluorescence immunoassay</ 
                                 <keyword>placenta</keyword><x>, </x>
                                 <keyword>plasma</keyword><x>, </x>
                                 <keyword>tissue factor</ 

More information about the General mailing list