Table of Contents

Module: eXistDA_utils eXistDA/eXistDA_utils.py

eXistDA_utils.py : Utilities for eXistDA Product

Imported modules   
from Globals import MessageDialog
import htmlentitydefs
import types
import urllib
import xml.dom.minidom
Functions   
URIHasServerName
convert
getDict
getInvalidMsg
getRscNameFromURI
getServerNameFromURI
is4SuiteAvailable
isHTTPURI
iseXistURI
recurse_getDict
  URIHasServerName 
URIHasServerName ( URI )

Returns True if the URI is containing a server name, False otherwise.

  • URI : a string containing the URI to scan.

  convert 
convert (
        text,
        encoding_from,
        encoding_to,
        )

Converts text , encoded in encoding_from to the encoding encoding_to.

  • returns the text converted into encoding_to (if necessary) or raise an exception if something weird happened

  • text : a string containing the text to convert

  • encoding_from : a string containing the encoding of the text to convert

  • encoding_to : a string containing the encoding to convert the text to

  getDict 
getDict ( fichier_string,  encoding=DEFAULT_ENCODING )

Returns the dict by calling the recursive method recurse_getDict.

  getInvalidMsg 
getInvalidMsg (
        server='',
        port='',
        username='',
        password='',
        encoding='',
        )

Verifies if the parameters passed to create or modify an eXistDA object are valid for use. Not all is verified...

  • Returns None if no error is found. Returns a MessageDialog object if something bad happened.

Exceptions   
ValueError
  getRscNameFromURI 
getRscNameFromURI ( URI )

Get the resource name from an URI.

  • Returns the name of the [eXist | HTTP] resource corresponding to the URI. Returns empty string if none.

  getServerNameFromURI 
getServerNameFromURI ( URI )

Get the server name from an URI.

  • Returns a string containing the name of the [eXist | HTTP] server corresponding to the URI (with the port number). Returns empty string if none.

  is4SuiteAvailable 
is4SuiteAvailable ()

Returns 1 if 4Suite can be used to make external XSLT, 0 otherwise.

  isHTTPURI 
isHTTPURI ( URI )

Verifies if URI is an HTTP URI (ie beggining with HEADER_HTTP_URI).

  • Returns 1 if URI is an HTTP-like URI. 0 otherwise

  • URI : the string to test

  iseXistURI 
iseXistURI ( URI )

Verifies if URI is an eXist URI (ie beggining with HEADER_EXIST_URI).

  • Returns 1 if URI is an eXist-like URI. 0 otherwise

  • URI : the string to test

  recurse_getDict 
recurse_getDict (
        noeud,
        encoding,
        lst_nom_noeuds,
        cedico,
        )

Returns a part of a dict which keys are XML tags and their values.


Table of Contents

This document was automatically generated on Tue Jul 20 14:11:38 2004 by HappyDoc version 2.1