Changeset 2644:a9c9fff25126 in livinglogic.python.xist for src/ll/xist/scripts/dtd2xsc.py

Show
Ignore:
Timestamp:
01/31/07 18:47:09 (13 years ago)
Author:
Walter Doerwald <walter@…>
Branch:
default
Message:

Update ll.xist.xnd and ll.xist.ns.tld to work with the new namespace
handling. Fix tests.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • src/ll/xist/scripts/dtd2xsc.py

    r2643 r2644  
    3131 
    3232 
    33 def dtd2xsc(dtdurl, outurl, verbose, xmlname, xmlurl, shareattrs, model, defaults): 
     33def dtd2xsc(dtdurl, outurl, verbose, xmlns, shareattrs, model, defaults): 
    3434    if verbose: 
    3535        print "Parsing DTD %s ..." % dtdurl 
     
    3838    if verbose: 
    3939        print "Converting ..." 
    40     data = xnd.fromdtd(d, xmlname, xmlurl) 
     40    data = xnd.fromdtd(d, xmlns) 
    4141 
    4242    if shareattrs=="dupes": 
     
    5656    p.add_option("-o", "--output", dest="output", metavar="FILE", help="write output to FILE") 
    5757    p.add_option("-v", "--verbose", action="store_true", dest="verbose") 
    58     p.add_option("-p", "--prefix", dest="xmlname", help="the XML prefix for this namespace", default="prefix", metavar="PREFIX") 
    59     p.add_option("-u", "--url", dest="xmlurl", help="the XML namespace name", metavar="URL") 
     58    p.add_option("-x", "--xmlns", dest="xmlns", help="the namespace name for this module") 
    6059    p.add_option("-a", "--shareattrs", dest="shareattrs", help="Should identical attributes be shared among elements?", choices=("none", "dupes", "all"), default="dupes") 
    6160    p.add_option("-m", "--model", dest="model", default="once", help="Add sims information to the namespace", choices=("no", "all", "once")) 
     
    7170    else: 
    7271        output = url.URL(options.output) 
    73     dtd2xsc(input, output, options.verbose, options.xmlname, options.xmlurl, options.shareattrs, options.model, options.defaults) 
     72    dtd2xsc(input, output, options.verbose, options.xmlns, options.shareattrs, options.model, options.defaults) 
    7473 
    7574