"""
Global parameters:
  CSharp Type     Name
  ===========     ====
  string          ParameterDocumentPath
  string          ParameterOriginalDocumentPath
  string          ParameterXmlPath
"""

# system imports
from System.IO import Path

# local imports
import sys
sys.path.insert(0, Path.GetDirectoryName(globals()['__file__']))
from router import Router
import utils

env = {
    'docPath': globals()['ParameterDocumentPath'],
    'originalDocPath': globals()['ParameterOriginalDocumentPath'],
    'xmlPath': globals()['ParameterXmlPath']
}

env['thisDir'] = Path.GetDirectoryName(globals()['__file__'])
env['commonDir'] = Path.Combine(Path.GetDirectoryName(Path.GetDirectoryName(env['thisDir'])), 'common')
env['xslDir'] = Path.Combine(Path.GetDirectoryName(env['thisDir']), 'xsl')
env['source'] = globals()['ParameterOriginalDocumentPath']
env['method'] = 'xml'

Router(utils.DictAsObject(env))
