1# TclDOM package index - hand crafted
2#
3# $Id: pkgIndex.tcl.macosx,v 1.4 2002/10/14 13:07:45 balls Exp $
4
5package ifneeded dom::generic 2.4 [list load [file join $dir .. .. .. libtcldom.framework libtcldom]]
6package ifneeded dom::c 2.0 [list load [file join $dir .. libtcldom2.0.dylib]]
7package ifneeded dom::libxml2 2.4 [list load [file join $dir .. .. .. tcldom-libxml2.framework tcldom-libxml2] Tcldomxml]
8package ifneeded dom::tclgeneric 2.4 [list source [file join $dir dom.tcl]]
9package ifneeded dom::tcl 2.4 [list source [file join $dir domimpl.tcl]]
10package ifneeded dommap 1.0 [list source [file join $dir dommap.tcl]]
11package ifneeded xmlswitch 1.0 [list source [file join $dir xmlswitch.tcl]]
12
13package ifneeded cgi2dom 1.1 [list source [file join $dir cgi2dom.tcl]]
14
15namespace eval ::dom {}
16
17# Requesting the generic dom package loads the C package 
18# if available, otherwise falls back to the generic Tcl package.
19# The application can tell which it got by examining the
20# list of packages loaded (and looking for dom::c or dom::tclgeneric).
21
22package ifneeded dom 2.4 {
23    if {[catch {package require dom::generic 2.4}]} {
24	package require dom::tclgeneric
25    } else {
26	catch {package require dom::c}
27	catch {package require dom::libxml2 2.4}
28    }
29    package provide dom 2.4
30
31    # Both the C and pure Tcl versions of the generic layer
32    # make use of the Tcl implementation.
33
34    package require dom::tcl
35}
36
37