Home My Page Projects Code Snippets Project Openings SML/NJ
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files

SCM Repository

[smlnj] View of /smlnj-lib/trunk/Dev/XML/xml-tree-fn.sml
ViewVC logotype

View of /smlnj-lib/trunk/Dev/XML/xml-tree-fn.sml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3871 - (download) (annotate)
Thu Mar 27 15:17:18 2014 UTC (5 years, 5 months ago) by jhr
File size: 834 byte(s)
  Working on XML library
(* xml-tree-fn.sml
 *
 * COPYRIGHT (c) 2013 The Fellowship of SML/NJ (http://www.smlnj.org)
 * All rights reserved.
 *)

functor XMLTreeFn (Schema : XML_SCHEMA) : XML_TREE =
  struct

    structure Schema = Schema

  (* limited support for <!DOCTYPE ...> declarations.  Internal subsets are not
   * current supported.
   *)
    datatype doctype = DOCTYPE of string * external_id option

    and external_id
      = SYSTEM of string
      | PUBLIC of string * string
	
    datatype content
      = TEXT of string
      | CDATA of string
      | ELEMENT of {
	    name : Schema.element,
	    attrs : Schema.attribute list,
	    content : content list
	  }

    type tree = {
	xmlDecl : Schema.attribute list option,	(* NONE if there is no decl *)
	doctype : doctype option,
	content : content			(* will be an ELEMENT *)
      }

  end

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0