Back to index

texmacs  1.0.7.15
fromxml.cpp
Go to the documentation of this file.
00001 
00002 /******************************************************************************
00003 * MODULE     : fromxml.cpp
00004 * DESCRIPTION: conversion of logical xml and html trees into edit trees
00005 * COPYRIGHT  : (C) 2003  Joris van der Hoeven, David Allouche
00006 *******************************************************************************
00007 * This software falls under the GNU general public license version 3 or later.
00008 * It comes WITHOUT ANY WARRANTY WHATSOEVER. For details, see the file LICENSE
00009 * in the root directory or <http://www.gnu.org/licenses/gpl-3.0.html>.
00010 ******************************************************************************/
00011 
00012 #include "convert.hpp"
00013 
00014 tree
00015 tmml_upgrade (tree doc) {
00016   if ((!is_tuple (doc, "document")) || (N(doc)<2))
00017     return tree (ERROR, "bad format or data");
00018   string version= "1.0.1.24";
00019   if (is_tuple (doc[1], "TeXmacs", 1) && is_atomic (doc[1][1]))
00020     version= doc[1][1]->label;
00021   return scheme_tree_to_tree (doc, version);
00022 }