Re: Re: Exporting notebooks to xml (cnxml)

*To*: mathgroup at smc.vnet.net*Subject*: [mg61864] Re: [mg61852] Re: Exporting notebooks to xml (cnxml)*From*: "G. Raymond Brown" <gbrown at runbox.com>*Date*: Wed, 2 Nov 2005 04:09:34 -0500 (EST)*Sender*: owner-wri-mathgroup at wolfram.com

Thanks, Steven, I will follow your tips and redirect my efforts. I was afraid the answer might be something like this. My task is not _really_ what Mathematica is about. BTW, now I understand why the moderator truncated my original posting. I'll be more careful in the future. -GRB- Stephen T Hatton wrote: G. Raymond Brown wrote: > > Mathgroup, > > My original submission was truncated. The remainder is given below. > > -GRB- > > From: "G. Raymond Brown" To: mathgroup at smc.vnet.net > Subject: [mg61864] [mg61852] Exporting notebooks to xml (cnxml) >> I'm using Mathematica Version 5.1.1.0 in a Windows XP environment. >> >> I want to export the notebooks to XML + MathML files in the cnxlm > flavor >> described at http://cnx.rice.edu/. I'd prefer that the cells at the >> Subsubsection level not appear in the exported XML file. (This is not a >> big deal - I can easily edit them out.) >> >> I'm having some trouble understanding the help documentation for the >> Export function. The syntax is Export[file.ext,expr]. The expr needed >> appears to be NotebookObject[fe,id], where fe is a FrontEndObject and > id >> is an "integer that gives a unique serial number for this open > notebook . > > I'm running only one FrontEnd (the one that opens when I click on the > Mathematica icon on my Dell laptop). How do I determine the values of fe > and id for use in NotebookObject? Have a look at "Manipulating Notebooks" in The Mathematica Book (on-line help). You may find it's more trouble that its worth as a means of obtaining your immediate goals. > Also, what should I set for ConversionOptions? For a previously > successful conversion (using MS Word as an intermediary and laboriously > inserting the MathML expressions by hand, one-by-one, an experience I do > not wish to repeat), the leading tags in the resulting file are: For the most part, Mathematica isn't going to do a lot for you. You have to program it to so anything other than exporting the XML formats it already understands. > <?xml version 1.0 encoding utf-8 standalone no ?> > <!DOCTYPE document PUBLIC -//CNX//DTD CNXML 0.5 plus MathML//EN > http://cnx.rice.edu/cnxml/0.5/DTD/cnxml_mathml.dtd > > <document xmls http://cnx.rice.edu/cmxml > xmlns:md http://cnx.rice.edu/mdml/0.4 > xmlns:m http://www.w3.org/1998/Math/MathML/ > id none > > > I can't even read this, much less understand it, which pretty well > establishes my level of understanding of XML. But I think it tells me > what should appear in ConversionOptions. > > Any help is greatly appreciated. Punt. I could be wrong, but at this point you would probably be better off trying to edit the xhtml by hand. I just found this little gem online. It should greatly accelerate your learning of XML. http://www.oxygenxml.com/ It will probably be of far more immediate use to you than Mathematica will be. There's a 30 freebe, which you can use for learning, but if you publish, you are obligated to pay. They also have academic discounts, but I don't know what they are. Buy this book, and read it with your favorite text editor opened.: http://www.oreilly.com/catalog/xmlpr3/index.html G. Raymond Brown, Ph.D. Scientific Program Coordinator Division of Science and Mathematics Morehouse College