Changeset 4293:44a34f6adadc in livinglogic.python.xist for src/ll/xist/scripts/xml2xsc.py

Show
Ignore:
Timestamp:
01/21/11 13:36:40 (9 years ago)
Author:
Walter Doerwald <walter@…>
Branch:
default
Message:

Add option --force-ns for forcing a namespace name on un-namespaced elements in xml2xsc.

Files:
1 modified

Legend:

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

    r4289 r4293  
    133133    p.add_argument("-s", "--shareattrs", dest="shareattrs", help="Should identical attributes be shared among elements? (default: %(default)s)", choices=("none", "dupes", "all"), default="dupes") 
    134134    p.add_argument("-m", "--model", dest="model", help="Create sims info? (default: %(default)s)", choices=("none", "simple", "fullall", "fullonce"), default="simple") 
     135    p.add_argument("-n", "--force-ns", dest="forcens", metavar="NAME", help="Force elements without a namespace into this namespace") 
    135136 
    136137    args = p.parse_args(args) 
    137     print makexnd(args.urls, parser=args.parser, shareattrs=args.shareattrs, model=args.model).aspy(model=args.model) 
     138    print makexnd(args.urls, parser=args.parser, shareattrs=args.shareattrs, model=args.model).aspy(model=args.model, forcens=args.forcens) 
    138139 
    139140