########################################################################
# $Header: /var/local/cvsroot/4Suite/Ft/Server/Server/Xslt/FtssXsltBase.py,v 1.11 2005/01/03 19:25:17 jkloth Exp $
"""
Common functions for repo XSLT extensions

Copyright 2004 Fourthought, Inc. (USA).
Detailed license and copyright information: http://4suite.org/COPYRIGHT
Project home, documentation, distributions: http://4suite.org/
"""

from Ft.Server import RESERVED_NAMESPACE as _RESERVED_NAMESPACE

def FetchBaseObject(processor, path=None):
    base = processor._repository.fetchResource(
        processor.extensionParams.get((_RESERVED_NAMESPACE, 'path'), '/'))
    if path:
        base = base.fetchResource(path)
    return base
