Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > translating LaTeX to XML

Reply
Thread Tools

translating LaTeX to XML

 
 
Michael Friendly
Guest
Posts: n/a
 
      04-02-2004
I have a LaTeX document describing a long list of items that I want to
translate to XML to treat these as a database. I've written a perl
script to do the basic translation, and a basic DTD file,
but I am stumped at translating
LaTeX character encodings to something XML won't choke on.

I found GNU recode to solve most of this, using

cat milestone.tex | recode -d tex..xml | itemdb -s xml -o milestone.xml

where itemdb is my perl script, and I've gotten rid of the diacritical
characters, but I'm getting errors with &s in URLs:

XML Parsing Error: not well-formed
Location: file:///home/friendly/SCS/Gallery/milestone/Private/milestone.xml
Line Number 2397, Column 101: <commentary
url="http://historical.library.cornell.edu/cgi-bin/cul.math/docviewer?did=00620001&seq=3"
text="Text of d'Ocagne'sbook on parallel coordinates" />
----------------------------------------------------------------------------------------------------^

(This is from the mozilla browser, trying to load the milestone.xml file.)
I'm pretty much a newbie with XML, so I don't know whether it is a
problem with my DTD or what tools are available (debian linux)

-Michael


--
Michael Friendly Email: http://www.velocityreviews.com/forums/(E-Mail Removed)
Professor, Psychology Dept.
York University Voice: 416 736-5115 x66249 Fax: 416 736-5814
4700 Keele Street http://www.math.yorku.ca/SCS/friendly.html
Toronto, ONT M3J 1P3 CANADA

 
Reply With Quote
 
 
 
 
Patrick TJ McPhee
Guest
Posts: n/a
 
      04-04-2004
In article <c4k9m9$716$(E-Mail Removed)>,
Michael Friendly <(E-Mail Removed)> wrote:

% url="http://historical.library.cornell.edu/cgi-bin/cul.math/docviewer?did=00620001&seq=3"

You must encode & as &amp; and < as &gt; anywhere they appear as text in
any XML document, so this should be

url="http://historical.library.cornell.edu/cgi-bin/cul.math/docviewer?did=00620001&amp;seq=3"

(Must might be a bit strong here, you could get away with &#x26; and &#x3c;
if you find that more aesthetically pleasing.)

--

Patrick TJ McPhee
East York Canada
(E-Mail Removed)
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Converting XML/HTML to LaTeX/PDF John Redmond XML 0 02-28-2009 09:39 AM
Convert XML to Latex/PDF and XHTML John Redmond XML 0 02-24-2009 03:33 AM
Re: XML+Logs to Latex. XSLT? Florencio Cano Python 0 01-10-2008 08:32 PM
XML+Logs to Latex. XSLT? Florencio Cano Python 0 01-10-2008 08:13 PM
XML equivalent to LaTex res class Shmuel (Seymour J.) Metz XML 1 06-30-2004 02:46 PM



Advertisments